2022-07-04 21:36:33 +02:00
|
|
|
#!/bin/sh
|
2022-08-07 12:54:35 +02:00
|
|
|
filter() {
|
2022-08-10 17:01:49 +02:00
|
|
|
if mpc 1>/dev/null 2>&1 && [ "$(mpc | wc -l)" -eq 3 ]; then
|
2022-08-07 12:54:35 +02:00
|
|
|
song=$(mpc current -f "%artist% - %title%" | xargs -0 )
|
2022-08-11 18:51:42 +02:00
|
|
|
[ ${#song} -gt 35 ] && song="$(printf %.35s "$song")…"
|
2022-08-11 10:20:33 +02:00
|
|
|
mpc | awk 'NR==2' | grep -q playing && icon="" || icon=""
|
2022-08-16 00:01:38 +02:00
|
|
|
echo "$icon $song"
|
2022-08-10 17:01:49 +02:00
|
|
|
elif mpc 1>/dev/null 2>&1 && [ "$(mpc | wc -l)" -eq 1 ]; then
|
2022-08-16 00:01:38 +02:00
|
|
|
echo "ﱙ"
|
2022-08-07 12:54:35 +02:00
|
|
|
else
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
2022-07-04 21:36:33 +02:00
|
|
|
|
|
|
|
pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 &
|