mirror of
https://github.com/balkian/dotfiles.git
synced 2024-11-05 05:01:43 +00:00
d1067cbb00
After the last update, I started getting duplicated bars when using cloned monitors. This commit changes the polybar.sh script to use replace xrandr with a call to `polybar --list-monitors`, which ignores cloned monitors by default.
14 lines
312 B
Bash
Executable File
14 lines
312 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Terminate already running bar instances
|
|
killall -q polybar
|
|
|
|
# Wait until the processes have been shut down
|
|
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
|
|
|
for m in $(polybar --list-monitors | cut -d":" -f1); do
|
|
MONITOR=$m polybar --reload main &
|
|
done
|
|
polybar --reload main &
|
|
fi
|