From b1562218b4eb8b1837cea87061ba765c2701a297 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Thu, 2 Apr 2020 02:36:27 -0400 Subject: [PATCH] add wait back? --- .local/bin/launch_polybar | 3 +++ 1 file changed, 3 insertions(+) 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 &