feat: display song artist, not album artist
This commit is contained in:
parent
5194b7f903
commit
7c0ffbf953
@ -13,7 +13,7 @@
|
|||||||
unicode() { sed "s/[‘’]/'/g;s/[“”]/\"/g"; }
|
unicode() { sed "s/[‘’]/'/g;s/[“”]/\"/g"; }
|
||||||
format() { sed "s/^volume:n\/a.*//g;/^volume:/d;s/\\&/&/g;s/\\[paused\\].*//g;s/\\[playing\\].*//g"; }
|
format() { sed "s/^volume:n\/a.*//g;/^volume:/d;s/\\&/&/g;s/\\[paused\\].*//g;s/\\[playing\\].*//g"; }
|
||||||
|
|
||||||
mpc="$(mpc --format "%albumartist% - %title%")"
|
mpc="$(mpc --format "%artist% - %title%")"
|
||||||
title="$(echo "$mpc" | head -n1 | cut -d'-' -f2 | unicode)"
|
title="$(echo "$mpc" | head -n1 | cut -d'-' -f2 | unicode)"
|
||||||
[ "$(echo "$title" | wc -c)" -gt 18 ] && title="$(printf "%.15s..." "$title")"
|
[ "$(echo "$title" | wc -c)" -gt 18 ] && title="$(printf "%.15s..." "$title")"
|
||||||
artist="$(echo "$mpc" | head -n1 | cut -d'-' -f1 | unicode)"
|
artist="$(echo "$mpc" | head -n1 | cut -d'-' -f1 | unicode)"
|
||||||
|
Reference in New Issue
Block a user