1
0
Fork 0

add playerctl artist

This commit is contained in:
Luca Bilke 2023-02-09 12:14:40 +01:00
parent a44c25a75a
commit 97002e2fc6
No known key found for this signature in database
GPG Key ID: 7B77C51E8C779E75
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@
pidof -x sbd-playerctl >/dev/null 2>&1 || sbd-playerctl >/dev/null 2>&1 &
[ "$(playerctl status 2>&1)" = "No players found" ] && echo ""ﱙ && exit 1
# song="$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)"
song="$(playerctl metadata xesam:title)"
song="$(playerctl metadata xesam:title) - $(playerctl metadata xesam:artist)"
[ ${#song} -gt 35 ] && song="$(printf %.35s "$song")…"
icon=$(playerctl status | sed "s/Playing//;s/Paused//;")
echo "$icon $song"