diff options
Diffstat (limited to '.local/bin/status/sb-battery')
-rwxr-xr-x | .local/bin/status/sb-battery | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/.local/bin/status/sb-battery b/.local/bin/status/sb-battery deleted file mode 100755 index 2fe3ce5..0000000 --- a/.local/bin/status/sb-battery +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -case $(hostname -s) in - mother) exit ;; - po-rbo) - printf "^c#fabd2f^" - charge=$(cat /sys/class/power_supply/BAT0/capacity) - case "$(cat /sys/class/power_supply/BAT0/status)" in - "Charging"|"Not charging") printf " " ;; - "Full") printf " "; return ;; - esac - ;; - mars) - echo -n "^c#fabd2f^" - charge=$(apm -l) - [ "$(apm -b)" -eq 3 ] && printf " " - ;; -esac - -case $(echo "$charge" / 20 | bc) in - "0") printf " " ;; - "1") printf " " ;; - "2") printf " " ;; - "3") printf " " ;; - "4") - [ "$charge" -gt 98 ] && return - printf " " - ;; - "5") - [ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ] && return - printf "" - ;; -esac |