[module/battery] Add remaining time, if available

Add remaining time directly to widget, if available, and if not on
charge.

see #146
This commit is contained in:
Tobias Witek 2017-07-26 16:41:30 +02:00
parent 6a0578d2c3
commit 115f03cb0f
3 changed files with 32 additions and 27 deletions

View file

@ -32,6 +32,7 @@ class TestBatteryModule(unittest.TestCase):
self.exists.return_value = True
self.engine = mock.Mock()
self.config = Config()
self.config.set("battery.showremaining", "false")
self.module = Module(engine=self.engine, config={"config":self.config})
self.config.set("battery.critical", "20")