From 84f3886d289dccefd965d05b4e17f245d3a309b9 Mon Sep 17 00:00:00 2001 From: Squibid Date: Sun, 4 Aug 2024 02:12:04 -0400 Subject: improve mpdnotifys portability --- mpdnotify/run | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mpdnotify/run') diff --git a/mpdnotify/run b/mpdnotify/run index 6f4c929..10ce9e7 100755 --- a/mpdnotify/run +++ b/mpdnotify/run @@ -1,6 +1,6 @@ #!/bin/sh # make sure mpd is running -sv check "$HOME/.local/share/service/mpd" > /dev/null || exit 1 +sv check "$SV/mpd" > /dev/null || exit 1 # set DISPLAY environment variable so notify send doesn't complain export DISPLAY=:0 @@ -9,9 +9,10 @@ export DISPLAY=:0 while song="$(mpc current --wait)" + rm -f "$coverartfile" # remove old coverart file if [ $coverart -eq 1 ]; then - ffmpeg -y -i "/mnt/hdd/moosic/$(mpc -f %file% | head -1)" "$coverartfile" & + ffmpeg -y -i "$musicdir/$(mpc -f %file% | head -1)" "$coverartfile" & timeout 3 inotifywait -e close "$coverartfile" notify-send -i "$coverartfile" -r $ID "Now playing" "$song" else -- cgit v1.2.1