summaryrefslogtreecommitdiffstats
path: root/.local/bin/status/sb-volume
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-08-24 10:15:04 +0200
committerJoe <bousset.rudy@gmail.com>2022-08-24 10:15:04 +0200
commitfd84eee156baafb1b3d394cc784582f8e1fecbe2 (patch)
treeba428ef8fd5a94c10032a5b980935a4da1bffbcd /.local/bin/status/sb-volume
parentupdate (diff)
downloaddotfiles-bsd-fd84eee156baafb1b3d394cc784582f8e1fecbe2.tar.gz
dotfiles-bsd-fd84eee156baafb1b3d394cc784582f8e1fecbe2.tar.bz2
dotfiles-bsd-fd84eee156baafb1b3d394cc784582f8e1fecbe2.tar.xz
dotfiles-bsd-fd84eee156baafb1b3d394cc784582f8e1fecbe2.tar.zst
dotfiles-bsd-fd84eee156baafb1b3d394cc784582f8e1fecbe2.zip
update
Diffstat (limited to '')
-rwxr-xr-x.local/bin/status/sb-volume20
1 files changed, 14 insertions, 6 deletions
diff --git a/.local/bin/status/sb-volume b/.local/bin/status/sb-volume
index aefad80..402431d 100755
--- a/.local/bin/status/sb-volume
+++ b/.local/bin/status/sb-volume
@@ -2,12 +2,8 @@
vol="$(mixer vol | awk '{print $7}' | cut -d ':' -f1)"
-if [ "$vol" -gt "70" ]; then
+if [ "$vol" -gt "0" ]; then
icon=""
-elif [ "$vol" -gt "30" ]; then
- icon=""
-elif [ "$vol" -gt "0" ]; then
- icon=""
else
icon="婢"
fi
@@ -20,4 +16,16 @@ else
micon=""
fi
-echo "$micon $icon "
+echo -n "$micon $icon "
+
+case $(echo $vol / 12.5 | bc) in
+ "0") printf "[ ]";;
+ "1") printf "[= ]";;
+ "2") printf "[== ]";;
+ "3") printf "[=== ]";;
+ "4") printf "[==== ]";;
+ "5") printf "[===== ]";;
+ "6") printf "[====== ]";;
+ "7") printf "[======= ]";;
+ "8") printf "[========]";;
+esac