From 7c0ffbf9532db9ac84e6241046d24e66b5d625b3 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sun, 19 Sep 2021 12:29:02 +0200 Subject: [PATCH] feat: display song artist, not album artist --- .local/bin/statusbar/sb-music | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music index 0202cb8..a60adff 100755 --- a/.local/bin/statusbar/sb-music +++ b/.local/bin/statusbar/sb-music @@ -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)"