iso-profiles/community/bspwm/desktop-overlay/usr/bin/hidePanel

25 lines
391 B
Text
Raw Normal View History

2020-05-27 20:48:07 +02:00
#!/bin/bash
# Script to hide and un-hide panel
#=======================================
isRunning() {
ps -o comm= -C "$1" 2>/dev/null | grep -x "$1" >/dev/null 2>&1
}
hidePanel() {
gap=`grep "gap=" ~/.config/bspwm/bspwmrc | cut -d '=' -f 2`
killall limepanel
bspc config top_padding -$gap
}
showPanel() {
bspc wm -r
}
if isRunning limepanel; then
hidePanel
else
showPanel
fi