maybe it will work now

This commit is contained in:
2026-01-29 12:15:42 -08:00
parent bc530d0461
commit e5c037ec76

View File

@ -1,7 +1,14 @@
#!/bin/sh #!/bin/sh
# exit if another instance is already running # 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" echo "mpd-monitor already running"
exit exit
fi fi
@ -23,7 +30,7 @@ mpc idleloop |
ARTIST=$(mpc current -f %artist%) ARTIST=$(mpc current -f %artist%)
if [ -z "$TITLE" ]; then 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 else
notify-send "$TITLE" "$ARTIST" -i : notify-send "$TITLE" "$ARTIST" -i :
fi fi