diff --git a/.local/bin/launch_polybar b/.local/bin/launch_polybar index 16ad3396..76c2dd1c 100755 --- a/.local/bin/launch_polybar +++ b/.local/bin/launch_polybar @@ -3,6 +3,9 @@ # Terminate already running bar instances killall -q polybar +# Wait until the processes have been shut down +while pgrep -x polybar >/dev/null; do sleep 1; done + if type "xrandr"; then for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do MONITOR=$m polybar --reload main &