only wake up when mpd is playing and not on other mpd events
This commit is contained in:
parent
35545ff025
commit
a33beabe90
4
kunst
4
kunst
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue