From 0a3241ac304ecdd6854441af87515eb007e81e70 Mon Sep 17 00:00:00 2001 From: Pandada8 Date: Thu, 7 May 2015 10:58:28 +0800 Subject: [PATCH] pep8 and docs --- i3pystatus/backlight.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/i3pystatus/backlight.py b/i3pystatus/backlight.py index d6077a3..6261cf1 100644 --- a/i3pystatus/backlight.py +++ b/i3pystatus/backlight.py @@ -8,6 +8,8 @@ class Backlight(File): """ Screen backlight info + - Reuqire `xbacklight` installed to change the backlight through the scollwheel. + .. rubric:: Available formatters * `{brightness}` — current brightness relative to max_brightness @@ -35,15 +37,16 @@ class Backlight(File): } on_upscroll = "lighter" on_downscroll = "darker" + def init(self): self.base_path = self.base_path.format(backlight=self.backlight) self.has_xbacklight = shutil.which("xbacklight") is not None - super(Backlight, self).init() + super().init() def lighter(self): if self.has_xbacklight: - subprocess.Popen(["xbacklight", '+5']) + subprocess.Popen(["xbacklight", "+5"]) def darker(self): if self.has_xbacklight: - subprocess.Popen(["xbacklight", '-5']) + subprocess.Popen(["xbacklight", "-5"])