blob: b0fbd6d236df9c33a98ad13ffb5d784d860acff8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/bash
status="$(mpc -f "♫ %artist%, %album%, %title%" status)"
case "$BLOCK_BUTTON" in
1)
mpc toggle >/dev/null
;;
2)
mpc stop >/dev/null
;;
3)
nohup urxvt -title "Music player daemon client" -e ncmpcpp 2>&1 >/dev/null &
;;
4)
mpc prev >/dev/null
;;
5)
mpc next >/dev/null
;;
esac
if [[ "$status" == *[*(playing|paused)]* ]]; then
echo "$status" | head -1
echo
case "$status" in
*"[playing]"*)
echo "#ffff00"
;;
*"[paused]"*)
echo "#00ff00"
;;
esac
else
echo "♫"
fi
|