mpd-module-update now mpdup

it is autostarted by the music module if not already running
This commit is contained in:
Luke Smith 2020-05-26 07:22:06 -04:00
parent 7f58bbb22d
commit c153ac7fb4
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252
2 changed files with 3 additions and 1 deletions

View file

@ -4,5 +4,5 @@
# music player's status. mpd must be running on X's start for this to work. # music player's status. mpd must be running on X's start for this to work.
while : ; do while : ; do
mpc idle >/dev/null && pkill -RTMIN+11 "${STATUSBAR:-dwmblocks}" || break mpc idle >/dev/null && kill -45 "$(pidof "${STATUSBAR:-dwmblocks}")" || break
done done

View file

@ -2,6 +2,8 @@
filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d" | paste -sd ' ';} filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d" | paste -sd ' ';}
pidof -x mpdup >/dev/null 2>&1 || mpdup &
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
1) mpc status | filter ; setsid "$TERMINAL" -e ncmpcpp & ;; # right click, pause/unpause 1) mpc status | filter ; setsid "$TERMINAL" -e ncmpcpp & ;; # right click, pause/unpause
2) mpc toggle | filter ;; # right click, pause/unpause 2) mpc toggle | filter ;; # right click, pause/unpause