foxed monitor for polybar

This commit is contained in:
2020-07-09 13:17:17 +02:00
parent 51b65a654a
commit f822276f68
2 changed files with 8 additions and 5 deletions

View File

@@ -7,7 +7,12 @@ killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
polybar main &
if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload main &
done
else
polybar --reload main &
fi
echo "Bars launched..."