add playerctl artist
This commit is contained in:
parent
301d73357d
commit
238b168b18
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
||||||
pidof -x sbd-playerctl >/dev/null 2>&1 || sbd-playerctl >/dev/null 2>&1 &
|
pidof -x sbd-playerctl >/dev/null 2>&1 || sbd-playerctl >/dev/null 2>&1 &
|
||||||
[ "$(playerctl status 2>&1)" = "No players found" ] && echo ""ﱙ && exit 1
|
[ "$(playerctl status 2>&1)" = "No players found" ] && echo ""ﱙ && exit 1
|
||||||
# song="$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)"
|
# 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")…"
|
[ ${#song} -gt 35 ] && song="$(printf %.35s "$song")…"
|
||||||
icon=$(playerctl status | sed "s/Playing//;s/Paused//;")
|
icon=$(playerctl status | sed "s/Playing//;s/Paused//;")
|
||||||
echo "$icon $song"
|
echo "$icon $song"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue