mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-23 12:09:55 +00:00
fixed songo output for cmus
Previously would print `"song name" "song artist" -`
This commit is contained in:
7
neofetch
7
neofetch
@@ -1446,9 +1446,10 @@ getsong () {
|
|||||||
|
|
||||||
elif [ -n "$(ps x | awk '!(/awk/) && /cmus/')" ]; then
|
elif [ -n "$(ps x | awk '!(/awk/) && /cmus/')" ]; then
|
||||||
song="$(cmus-remote -Q | grep "tag artist \|title" 2>/dev/null)"
|
song="$(cmus-remote -Q | grep "tag artist \|title" 2>/dev/null)"
|
||||||
song=${song/tag artist }
|
artist="${song##*tag artist }"
|
||||||
song=${song/tag title/-}
|
title="${song##*tag title }"
|
||||||
song=${song//[[:space:]]/ }
|
title="${title%%tag artist*}"
|
||||||
|
song="$artist - $title"
|
||||||
state=$(cmus-remote -Q | awk -F ' ' '/status/ {printf $2}' 2>/dev/null)
|
state=$(cmus-remote -Q | awk -F ' ' '/status/ {printf $2}' 2>/dev/null)
|
||||||
|
|
||||||
elif pgrep "mocp" >/dev/null 2>&1; then
|
elif pgrep "mocp" >/dev/null 2>&1; then
|
||||||
|
|||||||
Reference in New Issue
Block a user