diff --git a/bin/mpd-monitor b/bin/mpd-monitor index d23ac66..7324c70 100755 --- a/bin/mpd-monitor +++ b/bin/mpd-monitor @@ -1,7 +1,14 @@ #!/bin/sh # exit if another instance is already running -if [ -n "$(pidof mpc idleloop)" ]; then +#if [ !$(pidof mpd-monitor > /dev/null) ]; then +# echo "mpd-monitor already running" +# exit +#fi + +# this might actually work... +RUNNING=$(pidof mpc > /dev/null) +if [ !$RUNNING ]; then echo "mpd-monitor already running" exit fi @@ -23,7 +30,7 @@ mpc idleloop | ARTIST=$(mpc current -f %artist%) if [ -z "$TITLE" ]; then - notify-send "End of queue or queue empty" -i : + notify-send "End of queue or queue empty" "or no metadata for track" -i : else notify-send "$TITLE" "$ARTIST" -i : fi