2023-02-06 10:27:26 +01:00
|
|
|
#!/bin/sh
|
2023-02-21 17:49:55 +01:00
|
|
|
|
2023-05-24 18:33:43 +02:00
|
|
|
big="\033[11m"
|
|
|
|
reset="\033[0m"
|
2023-02-21 17:49:55 +01:00
|
|
|
|
2023-02-06 10:27:26 +01:00
|
|
|
pidof -x sbd-playerctl >/dev/null 2>&1 || sbd-playerctl >/dev/null 2>&1 &
|
2024-01-15 22:25:14 +01:00
|
|
|
[ "$(playerctl status 2>&1)" = "No players found" ] && printf "%b%b" "$big" "$reset" && exit 1
|
2023-02-06 10:27:26 +01:00
|
|
|
# song="$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)"
|
2023-02-09 12:14:40 +01:00
|
|
|
song="$(playerctl metadata xesam:title) - $(playerctl metadata xesam:artist)"
|
2023-02-06 10:27:26 +01:00
|
|
|
[ ${#song} -gt 35 ] && song="$(printf %.35s "$song")…"
|
2023-02-21 17:49:55 +01:00
|
|
|
|
2024-01-15 22:25:14 +01:00
|
|
|
icon="$(playerctl status | sed "s/Playing//;s/Paused//;s/Stopped//;")"
|
2023-04-12 11:37:10 +02:00
|
|
|
printf "%b" "$big$icon$reset $song"
|