From c7db5a6fe18295e33bb655020d64fb0a8d39a6e0 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 7 Dec 2023 15:15:12 +0100 Subject: up --- .local/bin/status/sb-battery | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to '.local') diff --git a/.local/bin/status/sb-battery b/.local/bin/status/sb-battery index 74d1b0a..d366da9 100755 --- a/.local/bin/status/sb-battery +++ b/.local/bin/status/sb-battery @@ -4,8 +4,10 @@ case $(hostname -s) in mother) return ;; po-rbo) charge=$(cat /sys/class/power_supply/BAT0/capacity) - [ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ] && printf "󱐋 " - [ "$(cat /sys/class/power_supply/BAT0/status)" = "Not charging" ] && printf "󱐋 " + case "$(cat /sys/class/power_supply/BAT0/status)" in + "Charging"|"Not charging") printf "󱐋 " ;; + "Full") printf "󱐋 "; return ;; + esac ;; mars) charge=$(apm -l) @@ -22,5 +24,8 @@ case $(echo "$charge" / 20 | bc) in [ "$charge" -gt 94 ] && return printf " " ;; - "5") printf "󱐋 " ;; + "5") + [ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ] && return + printf "󱐋 " + ;; esac -- cgit v1.2.3