summaryrefslogtreecommitdiffstats
path: root/.local/bin/status/sb-volume
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-08-16 15:30:28 +0200
committerJoe <bousset.rudy@gmail.com>2022-08-16 15:30:28 +0200
commit7873b0ea652136cc3355c5ab6015938ced0a8264 (patch)
tree79787f2287d66d2876a2fd87d0bee34852d2f773 /.local/bin/status/sb-volume
parentupdate (diff)
downloaddotfiles-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 '.local/bin/status/sb-volume')
-rwxr-xr-x.local/bin/status/sb-volume23
1 files changed, 23 insertions, 0 deletions
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"