[modules/brightness] Fix return format

What: Fixes the return format in `brightness` module
Why: To remove the initial zero in the brightness indicator when below hundred.
This commit is contained in:
Caian R. Ertl 2018-01-31 18:52:16 -02:00
parent bb38593f2d
commit a75c71920e

View file

@ -29,7 +29,7 @@ class Module(bumblebee.engine.Module):
def brightness(self, widget):
if isinstance(self._brightness, float):
return "{:03.0f}%".format(self._brightness)
return "{:3.0f}%".format(self._brightness).strip()
else:
return "n/a"