From aae23dc6d11ae3e2f3178a41f99c5b1a40cfd800 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Mon, 23 May 2016 16:28:50 +1000 Subject: [PATCH] fixed songo output for cmus Previously would print `"song name" "song artist" -` --- neofetch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index e05b6258..672cead2 100755 --- a/neofetch +++ b/neofetch @@ -1446,9 +1446,10 @@ getsong () { elif [ -n "$(ps x | awk '!(/awk/) && /cmus/')" ]; then song="$(cmus-remote -Q | grep "tag artist \|title" 2>/dev/null)" - song=${song/tag artist } - song=${song/tag title/-} - song=${song//[[:space:]]/ } + artist="${song##*tag artist }" + title="${song##*tag title }" + title="${title%%tag artist*}" + song="$artist - $title" state=$(cmus-remote -Q | awk -F ' ' '/status/ {printf $2}' 2>/dev/null) elif pgrep "mocp" >/dev/null 2>&1; then