From 812ddc0df4b9964fd94b38f37f5b51313bc9b97c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Apr 2017 14:20:46 -0400 Subject: [PATCH] shell/mpd/bin: notify-song => notify-song.sh (non-interactive script) --- shell/mpd/.ncmpcpp/config | 2 +- shell/mpd/bin/{notify-song => notify-song.sh} | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) rename shell/mpd/bin/{notify-song => notify-song.sh} (91%) diff --git a/shell/mpd/.ncmpcpp/config b/shell/mpd/.ncmpcpp/config index f4bd6b1b..39809b4d 100644 --- a/shell/mpd/.ncmpcpp/config +++ b/shell/mpd/.ncmpcpp/config @@ -248,7 +248,7 @@ song_columns_list_format = (3f)[8]{NEr:#} (45)[5]{t|f:Title} (25)[13]{a|A:Artist ## Note: Custom command that will be executed each ## time song changes. Useful for notifications etc. ## -execute_on_song_change = "notify-song" +execute_on_song_change = "notify-song.sh" #playlist_show_mpd_host = no playlist_show_remaining_time = yes playlist_shorten_total_times = yes diff --git a/shell/mpd/bin/notify-song b/shell/mpd/bin/notify-song.sh similarity index 91% rename from shell/mpd/bin/notify-song rename to shell/mpd/bin/notify-song.sh index c45a1dc0..b29cabf5 100755 --- a/shell/mpd/bin/notify-song +++ b/shell/mpd/bin/notify-song.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +# A non-interactive script that creates notifications (libnotify on Linux, +# native notifications on MacOS), announcing the currently playing song. Used by +# ncmpcpp. + if ! pgrep mpd >/dev/null; then >&2 echo "mpd isn't running." exit 1