24 lines
390 B
Bash
24 lines
390 B
Bash
#!/usr/bin/env bash
|
|
|
|
# Terminate already running bar instances
|
|
killall -q polybar
|
|
|
|
# Wait until the processes have been shut down
|
|
while pgrep -x polybar >/dev/null; do sleep 1; done
|
|
|
|
function sth() {
|
|
echo sth
|
|
}
|
|
|
|
trap SIGCONT sth
|
|
|
|
# Launch bar for each display
|
|
polybar -m | cut -d':' -f1 | while read display
|
|
do
|
|
MONITOR=$display polybar example &
|
|
done
|
|
|
|
echo "Bars launched..."
|
|
|
|
wait
|