diff options
author | Joe <bousset.rudy@gmail.com> | 2022-08-16 12:29:35 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-08-16 12:29:35 +0200 |
commit | 595971d393c1793579dd7763817f449ade3077d8 (patch) | |
tree | dbe1f621c71c7dfb9ee3913297d3187f396ef19a /.local/bin/status/sb-mpd | |
parent | update (diff) | |
download | dotfiles-bsd-595971d393c1793579dd7763817f449ade3077d8.tar.gz dotfiles-bsd-595971d393c1793579dd7763817f449ade3077d8.tar.bz2 dotfiles-bsd-595971d393c1793579dd7763817f449ade3077d8.tar.xz dotfiles-bsd-595971d393c1793579dd7763817f449ade3077d8.tar.zst dotfiles-bsd-595971d393c1793579dd7763817f449ade3077d8.zip |
sbupdate
Diffstat (limited to '')
-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 |