feat: display song artist, not album artist

This commit is contained in:
David JULIEN 2021-09-19 12:29:02 +02:00
parent 5194b7f903
commit 7c0ffbf953
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@
unicode() { sed "s/[]/'/g;s/[“”]/\"/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)"
[ "$(echo "$title" | wc -c)" -gt 18 ] && title="$(printf "%.15s..." "$title")"
artist="$(echo "$mpc" | head -n1 | cut -d'-' -f1 | unicode)"