#!/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