aboutsummaryrefslogtreecommitdiffstats
path: root/mpdnotify/run
diff options
context:
space:
mode:
Diffstat (limited to 'mpdnotify/run')
-rwxr-xr-xmpdnotify/run5
1 files changed, 3 insertions, 2 deletions
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