diff --git a/bin/mpd-monitor b/bin/mpd-monitor new file mode 100755 index 0000000..7cd2cc9 --- /dev/null +++ b/bin/mpd-monitor @@ -0,0 +1,10 @@ +#!/bin/sh +mpc idleloop | + while read event; do + if [[ $event == "player" ]]; then + dunstctl close-all + TITLE=$(mpc status -f %title% | awk 'NR==1') + ARTIST=$(mpc status -f %artist% | awk 'NR==1') + notify-send "$TITLE" "$ARTIST" -i : + fi + done