Krolyxon
Auto
Light
Dark
Summary
Tree
Log
Refs
Find
Commit
0173cf5
Branches
master
Refs →
dotfiles-x11
/
.local
/
bin
/
statusbar
/
sb-music
11 lines · 271 B · Bourne Again Shell (bash)
Raw
Blame
History
Download
1
#!/bin/sh
2
3
filter
()
{
mpc
|
sed
"/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q"
|
paste
-
sd
' '
-
;}
4
5
pidof
-
x sb-mpdup
>
/dev/null
2
>&
1
||
sb-mpdup
>
/dev/null
2
>&
1
&
6
7
if
[
-
z
"$(filter)"
]
;
then
8
echo
""
9
else
10
echo
"[ $(filter) ]"
11
fi