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