From 1bf3786878eb499b6a0c56e47ba3f3e07cd81182 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 6 Oct 2023 16:19:51 -0700 Subject: [PATCH] Keep running even when MPD isn't MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In my current setup ‘mpd-notify’ gets started before ‘mpd’ is fully started, so at boot it'll immediately get disabled and I'll frequently forget to turn it back on. --- mpd-notify | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpd-notify b/mpd-notify index b51184b..f454e3f 100755 --- a/mpd-notify +++ b/mpd-notify @@ -1,5 +1,5 @@ #!/usr/bin/env zsh -mpc idleloop player | while read _ +while ! mpc idleloop player; do sleep 1; done 2>/dev/null | while read _ do song=$(mpc current) state=$(mpc status %state%)