2018-05-03 20:23:53 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
names=("chostybottombar" "chostytopbar")
|
2018-05-16 00:29:14 +02:00
|
|
|
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
|
2018-05-16 00:29:14 +02:00
|
|
|
MONITOR=${monitor} polybar -q --reload ${name} &
|
2018-05-03 20:23:53 +02:00
|
|
|
done
|
|
|
|
done
|
|
|
|
else
|
|
|
|
polybar --reload ${name} &
|
2018-05-16 00:29:14 +02:00
|
|
|
fi
|