+scripts/notify-song.sh
This commit is contained in:
parent
d58ca79f24
commit
6490354346
14
scripts/notify-song.sh
Executable file
14
scripts/notify-song.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if ! pgrep mpd >/dev/null; then
|
||||||
|
>&2 echo "mpd isn't running."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
info=$(mpc current)
|
||||||
|
if [[ -z $info ]]; then
|
||||||
|
>&2 echo "nothing is playing."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
notify-send --icon="media-playback-start" --app-name="ncmpcpp" "Now playing" "$info"
|
Loading…
Reference in a new issue