...ok now it actually works
This commit is contained in:
@ -1,7 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# quit if another instance is already running
|
||||
[ -z $(pidof mpd-monitor) ] && echo "mpd-monitor already running";exit
|
||||
if [ $(pidof mpd-monitor >/dev/null) ];then
|
||||
echo "mpd-monitor already running"
|
||||
exit
|
||||
fi
|
||||
|
||||
ID=$(mpc current -f %id% )
|
||||
mpc idleloop |
|
||||
while read -r event; do
|
||||
@ -18,7 +22,7 @@ mpc idleloop |
|
||||
TITLE=$(mpc current -f %title%)
|
||||
ARTIST=$(mpc current -f %artist%)
|
||||
|
||||
if [ -z $TITLE ]; then
|
||||
if [ -z "$TITLE" ]; then
|
||||
notify-send "End of queue or queue empty" -i :
|
||||
else
|
||||
notify-send "$TITLE" "$ARTIST" -i :
|
||||
|
||||
Reference in New Issue
Block a user