diff --git a/.local/bin/statusbar/sb-mpdup b/.local/bin/statusbar/sb-mpdup index af81a7d6..380c9feb 100755 --- a/.local/bin/statusbar/sb-mpdup +++ b/.local/bin/statusbar/sb-mpdup @@ -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