[statusbar] feat: handle >100% battery cases
This commit is contained in:
parent
1bd3ea5adc
commit
72d94850b4
@ -41,6 +41,9 @@ do
|
||||
if [ "Full" = "$status" ]; then
|
||||
status=" " && capacity="FULL"
|
||||
printf " %s:%s(%s) " "$slot" "$status" "$capacity"
|
||||
else
|
||||
if [ 100 -lt $(expr $capacity) ]; then
|
||||
status=""
|
||||
else
|
||||
if [ "$status" = "Charging" ]; then
|
||||
status=""
|
||||
@ -56,4 +59,5 @@ do
|
||||
fi
|
||||
printf " %s:%s (%0.2d%%) " "$slot" "$status" "$capacity";
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
Reference in New Issue
Block a user