3 # sends a notification on mpd song change :>
5 playing="$(mpc current)"
9 # block until song change
10 mpc idle player > /dev/null
12 # make sure the song acc changed
13 cur_song="$(mpc current)"
14 [ "$cur_song" = "$playing" ] && continue;
17 [ -z "$cur_song" ] && continue; # don't send notify if no song tho
19 out="${cur_song%.*}" # get rid of extension
20 notify-send "Now Playing: ${out##*/}" -i "" # get rid of dir