1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-21 11:42:28 +00:00

Fix polybar.sh

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.
This commit is contained in:
J. Fernando Sánchez 2020-12-28 14:58:13 +01:00
parent e813bc26e6
commit d1067cbb00

View File

@ -6,10 +6,8 @@ killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
for m in $(polybar --list-monitors | cut -d":" -f1); do
MONITOR=$m polybar --reload main &
done
else
done
polybar --reload main &
fi