mpd-module-update with break

This commit is contained in:
Luke Smith 2019-09-24 07:12:43 -04:00
parent c7d5707e1e
commit dc464e5bbb
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
2 changed files with 8 additions and 6 deletions

7
.local/bin/mpd-module-update Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
# 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.
while : ; do
mpc idle >/dev/null && pkill -RTMIN+11 dwmblocks || break
done

View file

@ -15,9 +15,4 @@ dunst & # dunst for notifications
sxhkd & # Bind keys with sxhkd
xset r rate 300 50 & # Speed xrate up
unclutter & # Remove mouse when idle
# 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.
while pgrep -x mpd >/dev/null; do
mpc idle >/dev/null; pkill -RTMIN+11 dwmblocks
done
mpd-module-update & # Check for when to update the mpd module