summaryrefslogtreecommitdiffstats
path: root/.local/bin/status/sb-mpd
blob: b2d2a98395818b72cc19d5de8c05f8acd394b1fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

mp=$(mpc status)
icon=$(echo "$mp" | sed -n 2p | sed -E 's/(^|\])[^[]*($|\[)//g')
case $icon in
	"playing") icon="契" ;;
	"paused")  icon="" ;;
	*)         return   ;;
esac
printf "%s %s" "$icon" "$(echo "$mp" | head -n1)"

# while : ; do
	# mpc idle >/dev/null
# done