Fix typo :(
This commit is contained in:
parent
3c01f85455
commit
babda71f9d
@ -1,6 +1,7 @@
|
|||||||
from i3pystatus.file import File
|
from i3pystatus.file import File
|
||||||
import shutils
|
from i3pystatus import Module
|
||||||
import subprocesss
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
class Backlight(File):
|
class Backlight(File):
|
||||||
@ -34,16 +35,15 @@ class Backlight(File):
|
|||||||
}
|
}
|
||||||
on_upscroll = "lighter"
|
on_upscroll = "lighter"
|
||||||
on_downscroll = "darker"
|
on_downscroll = "darker"
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
self.base_path = self.base_path.format(backlight=self.backlight)
|
self.base_path = self.base_path.format(backlight=self.backlight)
|
||||||
self.has_xbacklight = shutils.which("xbacklight") is not None
|
self.has_xbacklight = shutil.which("xbacklight") is not None
|
||||||
super().init()
|
super(Backlight, self).init()
|
||||||
|
|
||||||
def lighter(self):
|
def lighter(self):
|
||||||
if self.has_xbacklight:
|
if self.has_xbacklight:
|
||||||
subprocess.Popen(["backlight", '+5'])
|
subprocess.Popen(["xbacklight", '+5'])
|
||||||
|
|
||||||
def darker(self):
|
def darker(self):
|
||||||
if self.has_xbacklight:
|
if self.has_xbacklight:
|
||||||
subprocess.Popen(["backlight", '-5'])
|
subprocess.Popen(["xbacklight", '-5'])
|
||||||
|
Loading…
Reference in New Issue
Block a user