diff options
author | Joe <bousset.rudy@gmail.com> | 2022-08-16 15:30:28 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-08-16 15:30:28 +0200 |
commit | 7873b0ea652136cc3355c5ab6015938ced0a8264 (patch) | |
tree | 79787f2287d66d2876a2fd87d0bee34852d2f773 | |
parent | update (diff) | |
download | dotfiles-bsd-7873b0ea652136cc3355c5ab6015938ced0a8264.tar.gz dotfiles-bsd-7873b0ea652136cc3355c5ab6015938ced0a8264.tar.bz2 dotfiles-bsd-7873b0ea652136cc3355c5ab6015938ced0a8264.tar.xz dotfiles-bsd-7873b0ea652136cc3355c5ab6015938ced0a8264.tar.zst dotfiles-bsd-7873b0ea652136cc3355c5ab6015938ced0a8264.zip |
updae
Diffstat (limited to '')
-rwxr-xr-x | .local/bin/status/sb-mpd | 4 | ||||
-rwxr-xr-x | .local/bin/status/sb-net | 8 | ||||
-rwxr-xr-x | .local/bin/status/sb-volume | 23 |
3 files changed, 33 insertions, 2 deletions
diff --git a/.local/bin/status/sb-mpd b/.local/bin/status/sb-mpd index b2d2a98..0f65bfa 100755 --- a/.local/bin/status/sb-mpd +++ b/.local/bin/status/sb-mpd @@ -3,8 +3,8 @@ mp=$(mpc status) icon=$(echo "$mp" | sed -n 2p | sed -E 's/(^|\])[^[]*($|\[)//g') case $icon in - "playing") icon="契" ;; - "paused") icon="" ;; + "playing") icon="" ;; + "paused") icon="" ;; *) return ;; esac printf "%s %s" "$icon" "$(echo "$mp" | head -n1)" diff --git a/.local/bin/status/sb-net b/.local/bin/status/sb-net new file mode 100755 index 0000000..97283af --- /dev/null +++ b/.local/bin/status/sb-net @@ -0,0 +1,8 @@ +#!/bin/sh + +if ifconfig | grep -F ' active' >/dev/null; then + echo " " + return +fi + +echo " " diff --git a/.local/bin/status/sb-volume b/.local/bin/status/sb-volume new file mode 100755 index 0000000..f7b3cb1 --- /dev/null +++ b/.local/bin/status/sb-volume @@ -0,0 +1,23 @@ +#!/bin/sh + +vol="$(mixer vol | awk '{print $7}' | cut -d ':' -f1)" + +if [ "$vol" -gt "70" ]; then + icon="" +elif [ "$vol" -gt "30" ]; then + icon="" +elif [ "$vol" -gt "0" ]; then + icon="" +else + icon="婢" +fi + +mic="$(mixer rec | awk '{print $7}' | cut -d ':' -f1)" + +if [ "$mic" -gt "0" ]; then + micon="" +else + micon="" +fi + +echo "$icon | $micon" |