summaryrefslogtreecommitdiffstats
path: root/.local/bin/status
diff options
context:
space:
mode:
authorJoe <rrbo@proton.me>2023-12-07 15:15:12 +0100
committerJoe <rrbo@proton.me>2023-12-07 15:15:12 +0100
commitc7db5a6fe18295e33bb655020d64fb0a8d39a6e0 (patch)
tree1b788d9e50d6546b93ffc8e0998a2eb09ad48bd6 /.local/bin/status
parenteza up (diff)
downloaddotfiles-bsd-c7db5a6fe18295e33bb655020d64fb0a8d39a6e0.tar.gz
dotfiles-bsd-c7db5a6fe18295e33bb655020d64fb0a8d39a6e0.tar.bz2
dotfiles-bsd-c7db5a6fe18295e33bb655020d64fb0a8d39a6e0.tar.xz
dotfiles-bsd-c7db5a6fe18295e33bb655020d64fb0a8d39a6e0.tar.zst
dotfiles-bsd-c7db5a6fe18295e33bb655020d64fb0a8d39a6e0.zip
up
Diffstat (limited to '.local/bin/status')
-rwxr-xr-x.local/bin/status/sb-battery11
1 files changed, 8 insertions, 3 deletions
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