dotfiles/config/polybar/launch.sh

15 lines
344 B
Bash
Raw Normal View History

2021-09-07 23:08:05 +02:00
#!/usr/bin/env bash
2021-03-28 17:11:08 +02:00
# Terminate already running bar instances
2021-09-07 23:08:05 +02:00
pkill -u $UID -x polybar
2021-03-28 17:11:08 +02:00
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch Polybar
for m in $(polybar --list-monitors | cut -d":" -f1); do
2021-09-07 23:08:05 +02:00
MONITOR=$m polybar --reload bottom &
2021-03-28 17:11:08 +02:00
done
echo "Polybar launched..."