mirror of
https://github.com/balkian/dotfiles.git
synced 2024-12-22 00:38:11 +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
|
||||
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
|
||||
MONITOR=$m polybar --reload main &
|
||||
done
|
||||
else
|
||||
for m in $(polybar --list-monitors | cut -d":" -f1); do
|
||||
MONITOR=$m polybar --reload main &
|
||||
done
|
||||
polybar --reload main &
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user