diff --git a/bumblebee/modules/battery.py b/bumblebee/modules/battery.py index 4feb5e8..7b95480 100644 --- a/bumblebee/modules/battery.py +++ b/bumblebee/modules/battery.py @@ -14,6 +14,12 @@ class Module(bumblebee.module.Module): return "{:02d}%".format(self._capacity) + def warning(self): + return self._capacity < 20 + + def critical(self): + return self._capacity < 10 + def state(self): with open("/sys/class/power_supply/{}/status".format(self._battery)) as f: self._status = f.read().strip()