Compare commits
No commits in common. "b32187db911cd5143d7743efb89c432d0d8c7b91" and "946f970f3103093d53022d59917d8ad40761c186" have entirely different histories.
b32187db91
...
946f970f31
1 changed files with 4 additions and 9 deletions
13
base.nim
13
base.nim
|
@ -65,10 +65,10 @@ proc debugLog*(str: string) =
|
|||
defer: f.close()
|
||||
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)
|
||||
# Switch out of an i3 bindsym mode if set
|
||||
discard execCmd("i3-msg mode \"" & mode & "\"")
|
||||
discard execCmd("i3-msg mode \"default\"")
|
||||
|
||||
proc parseInput*(): i3BarInput =
|
||||
let input = readLineFromStdin("")
|
||||
|
@ -88,6 +88,8 @@ proc getArguments*(): seq[string] =
|
|||
return args
|
||||
|
||||
proc runDMenu*(data: Info, opts: varargs[string], rofi: bool = false): string =
|
||||
switch_twm_mode()
|
||||
|
||||
# Build dmenu/rofi command
|
||||
var cmd = "echo -e \""
|
||||
# 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)
|
||||
return output
|
||||
|
||||
|
||||
|
||||
# At Start up:
|
||||
|
||||
# Switch bindsym mode back to default as it could be being used.
|
||||
switchTwmMode()
|
||||
|
||||
for arg in getArguments():
|
||||
case arg:
|
||||
of "noloop":
|
||||
|
|
Loading…
Reference in a new issue