From a75c71920e08e2c3d532a210e1f3847e2b044034 Mon Sep 17 00:00:00 2001 From: "Caian R. Ertl" Date: Wed, 31 Jan 2018 18:52:16 -0200 Subject: [PATCH] [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. --- bumblebee/modules/brightness.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee/modules/brightness.py b/bumblebee/modules/brightness.py index 29ba4e3..417434e 100644 --- a/bumblebee/modules/brightness.py +++ b/bumblebee/modules/brightness.py @@ -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"