launch.sh
1# Terminate already running bar instances
2killall -q polybar
3
4while pgrep -u $UID -x polyba >/dev/null; do sleep 1; done
5
6if type "xrandr"; then
7 for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
8 MONITOR=$m polybar --reload main &
9 MONITOR=$m polybar --reload dots &
10 done
11else
12 polybar --reload main &
13 polybar --reload dots &
14fi
15
16# Launch the bar
17polybar eDP1 &
18polybar HDMI2 &
19
20