Commit 92246e7b authored by Michael Straube's avatar Michael Straube

song: simplify cmus

parent 541322be
...@@ -2640,17 +2640,10 @@ get_song() { ...@@ -2640,17 +2640,10 @@ get_song() {
"cmus"*) "cmus"*)
# NOTE: cmus >= 2.8.0 supports mpris2 # NOTE: cmus >= 2.8.0 supports mpris2
song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "}; song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; a=$0}
/tag artist/ { /tag album / {$1=$2=""; b=$0}
$1=$2=""; sub(" ", ""); a=$0 /tag title/ {$1=$2=""; t=$0}
} END {print a " \n" b " \n" t}')"
/tag album / {
$1=$2=""; sub(" ", ""); b=$0
}
/tag title/ {
$1=$2=""; sub(" ", ""); t=$0
}
END { print a " \n" b " \n" t }')"
;; ;;
"spotify"*) "spotify"*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment