summaryrefslogtreecommitdiffstats
path: root/.local/bin/status
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-09-05 15:51:30 +0200
committerJoe <bousset.rudy@gmail.com>2022-09-05 15:51:30 +0200
commitf59c9cb2da010f70421aa950e46a8cdd99a8acf3 (patch)
tree33882e44c413675ee91f19c89aca5869cb43ef60 /.local/bin/status
parentup (diff)
downloaddotfiles-bsd-f59c9cb2da010f70421aa950e46a8cdd99a8acf3.tar.gz
dotfiles-bsd-f59c9cb2da010f70421aa950e46a8cdd99a8acf3.tar.bz2
dotfiles-bsd-f59c9cb2da010f70421aa950e46a8cdd99a8acf3.tar.xz
dotfiles-bsd-f59c9cb2da010f70421aa950e46a8cdd99a8acf3.tar.zst
dotfiles-bsd-f59c9cb2da010f70421aa950e46a8cdd99a8acf3.zip
up
Diffstat (limited to '.local/bin/status')
-rwxr-xr-x.local/bin/status/sb-battery17
1 files changed, 17 insertions, 0 deletions
diff --git a/.local/bin/status/sb-battery b/.local/bin/status/sb-battery
new file mode 100755
index 0000000..bad456c
--- /dev/null
+++ b/.local/bin/status/sb-battery
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+status=$(apm -b)
+
+[ "$status" -eq 3 ] && exit
+
+case $(echo $(apm -l) / 12.5 | bc) in
+ "0") printf "[ ]";;
+ "1") printf "[= ]";;
+ "2") printf "[== ]";;
+ "3") printf "[=== ]";;
+ "4") printf "[==== ]";;
+ "5") printf "[===== ]";;
+ "6") printf "[====== ]";;
+ "7") printf "[======= ]";;
+ "8") printf "[========]";;
+esac