Merge pull request #23 from elenapan/fix_mpc_idle
only wake up when mpd is playing and not on other mpd events
This commit is contained in:
commit
82346b178e
4
kunst
4
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
|
||||
|
|
Loading…
Reference in New Issue