[statusbar] feat: handle >100% battery cases

This commit is contained in:
David JULIEN 2022-06-11 12:24:01 +02:00
parent 1bd3ea5adc
commit 72d94850b4

View File

@ -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