dotfiles/.config/polybar/scripts/launch_polybar.sh

14 lines
378 B
Bash
Raw Normal View History

2018-05-03 20:23:53 +02:00
#!/usr/bin/env bash
names=("chostybottombar" "chostytopbar")
killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
2018-05-03 20:23:53 +02:00
if type "xrandr"; then
for monitor in $(xrandr --query | grep " connected" | cut -d" " -f1); do
for name in ${names[@]}; do
MONITOR=${monitor} polybar -q --reload ${name} &
2018-05-03 20:23:53 +02:00
done
done
else
polybar --reload ${name} &
fi