diff options
author | Amin Bandali <amin@aminb.org> | 2016-11-18 22:28:31 -0500 |
---|---|---|
committer | Amin Bandali <amin@aminb.org> | 2016-11-18 22:28:31 -0500 |
commit | 7791c200d9b385f722863cbaf2341dafffdb272f (patch) | |
tree | dcecb593622cd4aea06a27332f69b606226889d2 /bspwm/.local/bin/toggle_tray | |
parent | b447fcc5a248329d10d995726822e6e001d9eec2 (diff) | |
download | configs-7791c200d9b385f722863cbaf2341dafffdb272f.tar.gz configs-7791c200d9b385f722863cbaf2341dafffdb272f.tar.xz configs-7791c200d9b385f722863cbaf2341dafffdb272f.zip |
Update bspwm & sxhkd dots
Diffstat (limited to '')
-rwxr-xr-x | bspwm/.local/bin/toggle_tray | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bspwm/.local/bin/toggle_tray b/bspwm/.local/bin/toggle_tray new file mode 100755 index 0000000..c081995 --- /dev/null +++ b/bspwm/.local/bin/toggle_tray @@ -0,0 +1,16 @@ +#!/bin/bash + +# from https://github.com/kallith/Dotfiles + +if [ $(pgrep -cf stalonetray) -gt 0 ]; then + wid=$(xdotool search --class stalonetray) + if [ "$(xdotool search --onlyvisible --class stalonetray)" != "" ]; then + xdotool windowunmap $wid + else + xdotool windowmap $wid + xdotool windowraise $wid + fi +else + xdotool search --class stalonetray + stalonetray +fi |