Show polybar only under on screen
parent
6886a70eac
commit
ad3005b3ea
|
@ -4,10 +4,10 @@ names=("chostybottombar" "chostytopbar")
|
||||||
killall -q polybar
|
killall -q polybar
|
||||||
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
|
if type "xrandr"; then
|
||||||
for monitor in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
monitors=$(xrandr --query | grep " connected" | cut -d" " -f1)
|
||||||
|
monarray=($monitors)
|
||||||
for name in ${names[@]}; do
|
for name in ${names[@]}; do
|
||||||
MONITOR=${monitor} polybar -q --reload ${name} &
|
MONITOR=${monarray[1]} polybar -q --reload ${name} &
|
||||||
done
|
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
polybar --reload ${name} &
|
polybar --reload ${name} &
|
||||||
|
|
Loading…
Reference in New Issue