maybe it will work now
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user