Update bspwm & sxhkd dots
[~bandali/configs] / bspwm / .local / bin / toggle_tray
1 #!/bin/bash
2
3 # from https://github.com/kallith/Dotfiles
4
5 if [ $(pgrep -cf stalonetray) -gt 0 ]; then
6 wid=$(xdotool search --class stalonetray)
7 if [ "$(xdotool search --onlyvisible --class stalonetray)" != "" ]; then
8 xdotool windowunmap $wid
9 else
10 xdotool windowmap $wid
11 xdotool windowraise $wid
12 fi
13 else
14 xdotool search --class stalonetray
15 stalonetray
16 fi