diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-12-26 12:46:06 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-12-26 15:03:58 +0100 |
commit | 0a158488734ae043f466b64b01741d634ff883a8 (patch) | |
tree | bc4d88a7188813a4947b9723b7079ed2fa1d29cc /functions.config | |
parent | 187862ed07028976c9840d2de195b609abf0d5a5 (diff) |
bindings: add shortcuts for changing desktops
Diffstat (limited to 'functions.config')
-rw-r--r-- | functions.config | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/functions.config b/functions.config index 304f222..eb8194b 100644 --- a/functions.config +++ b/functions.config @@ -84,6 +84,36 @@ DestroyFunc MPDControl AddToFunc MPDControl + I Exec mpc -q $* +# update desk_min/max for a given window +# this needs to be in a separate function from UpdateNumDesks, +# so that all the variables get updated on each invocation of the script +DestroyFunc UpdateNumDesksForWindow +AddToFunc UpdateNumDesksForWindow ++ I PipeRead '\ + if [ $[w.desk] -lt $[infostore.desk_min] ]; then \ + echo InfoStoreAdd desk_min $[w.desk]; \ + fi; \ + if [ $[w.desk] -gt $[infostore.desk_max] ]; then \ + echo InfoStoreAdd desk_max $[w.desk]; \ + fi \ +' + +DestroyFunc UpdateNumDesks +AddToFunc UpdateNumDesks ++ I InfoStoreAdd desk_min 0 ++ I InfoStoreAdd desk_max 0 ++ I NoWindow All (!StickyAcrossDesks) UpdateNumDesksForWindow + +DestroyFunc DeskNext +AddToFunc DeskNext ++ I UpdateNumDesks ++ I GotoDesk 1 0 $[infostore.desk_min] $[infostore.desk_max] + +DestroyFunc DeskPrev +AddToFunc DeskPrev ++ I UpdateNumDesks ++ I GotoDesk -1 0 $[infostore.desk_min] $[infostore.desk_max] + DestroyFunc FormDeskName AddToFunc FormDeskName + I Module FvwmForm FormDeskName DESK=$[desk.n] |