mirror of
https://github.com/balkian/dotfiles.git
synced 2024-11-24 05:02:29 +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:
parent
e813bc26e6
commit
d1067cbb00
@ -6,10 +6,8 @@ killall -q polybar
|
|||||||
# Wait until the processes have been shut down
|
# Wait until the processes have been shut down
|
||||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||||
|
|
||||||
if type "xrandr"; then
|
for m in $(polybar --list-monitors | cut -d":" -f1); do
|
||||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
MONITOR=$m polybar --reload main &
|
||||||
MONITOR=$m polybar --reload main &
|
done
|
||||||
done
|
|
||||||
else
|
|
||||||
polybar --reload main &
|
polybar --reload main &
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user