2024-07-29 15:24:07 -07:00
|
|
|
#!/usr/bin/env bash
|
2024-08-19 20:11:05 -07:00
|
|
|
# Terminate already running bar instances
|
|
|
|
|
# If all your bars have ipc enabled, you can use
|
|
|
|
|
polybar-msg cmd quit
|
|
|
|
|
# Otherwise you can use the nuclear option:
|
|
|
|
|
# killall -q polybar
|
|
|
|
|
|
2024-08-22 19:44:26 -07:00
|
|
|
# Launch bar on each monitor, tray on primary
|
|
|
|
|
polybar --list-monitors | while IFS=$'\n' read line; do
|
|
|
|
|
monitor=$(echo $line | cut -d':' -f1)
|
|
|
|
|
primary=$(echo $line | cut -d' ' -f3)
|
|
|
|
|
MONITOR=$monitor polybar --reload "top${primary:+"-primary"}" &
|
2024-08-19 13:44:17 -07:00
|
|
|
done
|