only wake up when mpd is playing and not on other mpd events

This commit is contained in:
elenapan 2019-08-01 13:35:07 +03:00
parent 35545ff025
commit a33beabe90
1 changed files with 3 additions and 1 deletions

4
kunst
View File

@ -218,7 +218,9 @@ main() {
# Waiting for an event from mpd; play/pause/next/previous # Waiting for an event from mpd; play/pause/next/previous
# this is lets kunst use less CPU :) # 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 if [ ! $SILENT ];then
echo "kunst: received event from mpd" echo "kunst: received event from mpd"
fi fi