Compare commits

..

No commits in common. "b32187db911cd5143d7743efb89c432d0d8c7b91" and "946f970f3103093d53022d59917d8ad40761c186" have entirely different histories.

View file

@ -65,10 +65,10 @@ proc debugLog*(str: string) =
defer: f.close() defer: f.close()
f.writeLine(str) f.writeLine(str)
proc switchTwmMode*(mode: string = "default") = proc switchTwmMode*() =
# I intend to add support for more twm as time goes on (I switch around a lot) # I intend to add support for more twm as time goes on (I switch around a lot)
# Switch out of an i3 bindsym mode if set # Switch out of an i3 bindsym mode if set
discard execCmd("i3-msg mode \"" & mode & "\"") discard execCmd("i3-msg mode \"default\"")
proc parseInput*(): i3BarInput = proc parseInput*(): i3BarInput =
let input = readLineFromStdin("") let input = readLineFromStdin("")
@ -88,6 +88,8 @@ proc getArguments*(): seq[string] =
return args return args
proc runDMenu*(data: Info, opts: varargs[string], rofi: bool = false): string = proc runDMenu*(data: Info, opts: varargs[string], rofi: bool = false): string =
switch_twm_mode()
# Build dmenu/rofi command # Build dmenu/rofi command
var cmd = "echo -e \"" var cmd = "echo -e \""
# if the text is empty, we don't want to create a menu item of it # if the text is empty, we don't want to create a menu item of it
@ -129,13 +131,6 @@ proc outputData*(data: Info, args: varargs[string]): string {.discardable.} =
output = runDmenu(data,args) output = runDmenu(data,args)
return output return output
# At Start up:
# Switch bindsym mode back to default as it could be being used.
switchTwmMode()
for arg in getArguments(): for arg in getArguments():
case arg: case arg:
of "noloop": of "noloop":