Show polybar only under on screen

master
Quentin Duchemin 2018-06-09 12:29:19 +02:00
parent 6886a70eac
commit ad3005b3ea
1 changed files with 4 additions and 4 deletions

View File

@ -4,10 +4,10 @@ names=("chostybottombar" "chostytopbar")
killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
if type "xrandr"; then
for monitor in $(xrandr --query | grep " connected" | cut -d" " -f1); do
for name in ${names[@]}; do
MONITOR=${monitor} polybar -q --reload ${name} &
done
monitors=$(xrandr --query | grep " connected" | cut -d" " -f1)
monarray=($monitors)
for name in ${names[@]}; do
MONITOR=${monarray[1]} polybar -q --reload ${name} &
done
else
polybar --reload ${name} &