From 13a72920d5ba82e0ddc9789da1f486afbe5cb642 Mon Sep 17 00:00:00 2001 From: G2-Games <72430668+G2-Games@users.noreply.github.com> Date: Sat, 17 Sep 2022 23:57:13 -0500 Subject: [PATCH] Fixed battery level showing more than 100% --- welcome.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/welcome.sh b/welcome.sh index 96ce728..5703f76 100755 --- a/welcome.sh +++ b/welcome.sh @@ -60,6 +60,10 @@ battery () { batlvl=$(cat /sys/class/power_supply/BAT1/capacity) fi + if [ $batlvl -ge 100 ]; then + batlvl=100 + fi + # Change color depending on level if [ $batlvl -eq 100 ]; then echo -en "The battery is ${FULL}fully charged${NCOL}. "