From a33beabe90f80047a346096e9018f571c4ae8603 Mon Sep 17 00:00:00 2001 From: elenapan Date: Thu, 1 Aug 2019 13:35:07 +0300 Subject: [PATCH] only wake up when mpd is playing and not on other mpd events --- kunst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kunst b/kunst index d663c40..e144c14 100755 --- a/kunst +++ b/kunst @@ -218,7 +218,9 @@ main() { # Waiting for an event from mpd; play/pause/next/previous # this is lets kunst use less CPU :) - mpc idle &> /dev/null + while true; do + mpc idle player &>/dev/null && (mpc status | grep "\[playing\]" &>/dev/null) && break + done if [ ! $SILENT ];then echo "kunst: received event from mpd" fi