2023-02-18 22:29:26 +01:00
|
|
|
#!/usr/bin/env bash
|
2023-12-18 21:58:40 +01:00
|
|
|
source ~/.config/polybar/.env
|
2023-02-18 22:29:26 +01:00
|
|
|
names=("chostybottombar" "chostytopbar")
|
|
|
|
killall -q polybar
|
|
|
|
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
2023-06-23 15:16:48 +02:00
|
|
|
monitor=$(xrandr --query | grep " connected" | grep "primary" | cut -d" " -f1)
|
2023-02-18 22:29:26 +01:00
|
|
|
for name in ${names[@]}; do
|
|
|
|
MONITOR=${monitor} polybar -q --reload ${name} &
|
2023-06-23 15:16:48 +02:00
|
|
|
done
|