dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit a06dcd33262f22ed32d92414aaadb5b8b6199942
parent 537edf44a26153e406ec3a169b5e33c2e313a100
Author: pyratebeard <root@pyratebeard.net>
Date:   Fri,  3 Jul 2020 17:36:15 +0100

notify if there no song details available

Diffstat:
Mbin/bin/mus | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/bin/mus b/bin/bin/mus @@ -11,5 +11,9 @@ elif [ "$cmd" == "n" ] ; then elif [ "$cmd" == "s" ] ; then /usr/bin/cmus-remote -s elif [ "$cmd" == "song" ] ; then - /usr/bin/notify-send -u 'normal' "$(cmus-remote -Q | grep -E "tag artist |tag album |tag title " | awk '{$1=""; print $0}')" + if [[ $(cmus-remote -Q | grep tag) ]] ; then + /usr/bin/notify-send -u 'normal' "$(cmus-remote -Q | grep -E "tag artist |tag album |tag title " | awk '{$1=""; print $0}')" + else + /usr/bin/notify-send -u 'normal' 'no song details available' + fi fi