Use pkill instead in sb-mpdup and make more robust

This commit is contained in:
appeasementPolitik 2022-10-02 16:40:26 +00:00 committed by GitHub
parent be7ed1516b
commit bf90f0bdec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,8 @@
# This loop will update the mpd statusbar module whenever a command changes the
# music player's status. mpd must be running on X's start for this to work.
pgrep -x 'mpd' || exit
while : ; do
mpc idle >/dev/null && kill -45 "$(pidof "${STATUSBAR:-dwmblocks}")" || break
mpc idle >/dev/null && pkill -RTMIN+11 "${STATUSBAR:-dwmblocks}"
done