From f59c9cb2da010f70421aa950e46a8cdd99a8acf3 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 5 Sep 2022 15:51:30 +0200 Subject: up --- .local/bin/status/sb-battery | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 .local/bin/status/sb-battery (limited to '.local/bin') 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 -- cgit v1.2.3