From 7e3371321e0fd7d09dd7233c48b62f1878e6b84a Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 28 Apr 2021 17:49:19 +0200 Subject: [media_status] only output mpd status if there is a song in the queue --- scripts/media_status.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/media_status.sh b/scripts/media_status.sh index ab169c0..8a65b4e 100755 --- a/scripts/media_status.sh +++ b/scripts/media_status.sh @@ -32,7 +32,11 @@ elif pgrep mpd &>/dev/null then if type mpc &>/dev/null then - echo MPD: "▐▐" $(mpc current) + current_song=$(mpc current) + if test -n "$current_song" + then + echo "MPD: ▐▐ $current_song" + fi else echo "for mpd status mpc is needed" fi -- cgit v1.2.3