dotfiles/herbstluftwm/panel.sh

17 lines
491 B
Bash
Raw Normal View History

2020-08-26 11:31:37 +02:00
#!/usr/bin/bash
# Inspired by the herbstluftwm panel configuration of DistroTube
# See: https://gitlab.com/dwt1/dotfiles/-/blob/master/.config/herbstluftwm/panel.sh
# If there is already a polybar, kill it and wait for it to shutdow
killall -q polybar
while pgrep -u $UID -x polybar > /dev/null; do sleep 1; done
if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload main &
done
else
polybar --reload main &
fi