pgrep is a little slow, slower than ps | grep

This commit is contained in:
Luke Smith
2020-04-11 10:03:33 -04:00
parent 7b9277ae0b
commit 080365dd22
6 changed files with 7 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
killall -q polybar
# Wait until the processes have been shut down
while pgrep -x polybar >/dev/null; do sleep 1; done
while ps ax | grep -q "\spolybar$"; do sleep 1; done
for i in $(polybar -m | awk -F: '{print $1}'); do MONITOR=$i polybar default & done