From 7791c200d9b385f722863cbaf2341dafffdb272f Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Fri, 18 Nov 2016 22:28:31 -0500 Subject: Update bspwm & sxhkd dots --- bspwm/.local/bin/toggle_tray | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bspwm/.local/bin/toggle_tray (limited to 'bspwm/.local/bin/toggle_tray') 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 -- cgit v1.2.3-60-g2f50