diff options
Diffstat (limited to '.local/bin/status/sb-mpd')
-rwxr-xr-x | .local/bin/status/sb-mpd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.local/bin/status/sb-mpd b/.local/bin/status/sb-mpd new file mode 100755 index 0000000..b2d2a98 --- /dev/null +++ b/.local/bin/status/sb-mpd @@ -0,0 +1,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 |