polylaunch (473B)
1 #!/bin/bash 2 3 # Terminate already running bar instances 4 killall -q polybar 5 6 # Wait until the processes have been shut down 7 #while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done 8 pkill polybar 9 10 # Launch Polybar, using default config location ~/.config/polybar/config 11 if type "xrandr"; then 12 for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do 13 MONITOR=$m polybar --reload example & 14 done 15 else 16 polybar --reload example & 17 fi 18 19 echo "Polybar launched..." 20