summaryrefslogtreecommitdiffstats
path: root/.local/bin/statusbar/mpdup
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-05-26 07:22:06 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-05-26 07:22:06 -0400
commitc153ac7fb427cf517db6d5e5bff0857ee894d407 (patch)
tree7da08e676d0f7c6a7054cee707484c9e1e5fba74 /.local/bin/statusbar/mpdup
parent7f58bbb22d847ffe93347652e5742b3aac63ebd2 (diff)
downloadeibhear-c153ac7fb427cf517db6d5e5bff0857ee894d407.tar.gz
eibhear-c153ac7fb427cf517db6d5e5bff0857ee894d407.tar.zst
eibhear-c153ac7fb427cf517db6d5e5bff0857ee894d407.zip
mpd-module-update now mpdup
it is autostarted by the music module if not already running
Diffstat (limited to '.local/bin/statusbar/mpdup')
-rwxr-xr-x.local/bin/statusbar/mpdup8
1 files changed, 8 insertions, 0 deletions
diff --git a/.local/bin/statusbar/mpdup b/.local/bin/statusbar/mpdup
new file mode 100755
index 0000000..af81a7d
--- /dev/null
+++ b/.local/bin/statusbar/mpdup
@@ -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