diff --git a/bumblebee/modules/battery.py b/bumblebee/modules/battery.py index 021e1eb..a83a2fd 100644 --- a/bumblebee/modules/battery.py +++ b/bumblebee/modules/battery.py @@ -20,6 +20,7 @@ class Module(bumblebee.module.Module): def data(self): with open("/sys/class/power_supply/{}/capacity".format(self._battery)) as f: self._capacity = int(f.read()) + self._capacity = self._capacity if self._capacity < 100 else 100 return "{:02d}%".format(self._capacity)