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

15 lines
381 B
Plaintext
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
2018-06-09 12:29:19 +02:00
monitors=$(xrandr --query | grep " connected" | cut -d" " -f1)
monarray=($monitors)
for name in ${names[@]}; do
2020-05-04 14:43:12 +02:00
MONITOR=${monarray[0]} polybar -q --reload ${name} &
2018-05-03 20:23:53 +02:00
done
else
polybar --reload ${name} &
2020-05-04 14:43:12 +02:00
fi