mirror of
https://github.com/G2-Games/welcome.sh.git
synced 2025-04-19 13:32:53 -05:00
Fixed battery level showing more than 100%
This commit is contained in:
parent
9575f5e9e1
commit
13a72920d5
1 changed files with 4 additions and 0 deletions
|
@ -60,6 +60,10 @@ battery () {
|
||||||
batlvl=$(cat /sys/class/power_supply/BAT1/capacity)
|
batlvl=$(cat /sys/class/power_supply/BAT1/capacity)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $batlvl -ge 100 ]; then
|
||||||
|
batlvl=100
|
||||||
|
fi
|
||||||
|
|
||||||
# Change color depending on level
|
# Change color depending on level
|
||||||
if [ $batlvl -eq 100 ]; then
|
if [ $batlvl -eq 100 ]; then
|
||||||
echo -en "The battery is ${FULL}fully charged${NCOL}. "
|
echo -en "The battery is ${FULL}fully charged${NCOL}. "
|
||||||
|
|
Loading…
Reference in a new issue