mpd-module-update now mpdup
it is autostarted by the music module if not already running
This commit is contained in:
8
.local/bin/statusbar/mpdup
Executable file
8
.local/bin/statusbar/mpdup
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/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 && kill -45 "$(pidof "${STATUSBAR:-dwmblocks}")" || break
|
||||
done
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
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
|
||||
1) mpc status | filter ; setsid "$TERMINAL" -e ncmpcpp & ;; # right click, pause/unpause
|
||||
2) mpc toggle | filter ;; # right click, pause/unpause
|
||||
|
||||
Reference in New Issue
Block a user