From 40c26c2d7ef7a9c135c6325a5684840c14dfb6bf Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 25 Apr 2022 11:29:08 -0700 Subject: [PATCH] Improved backlight management --- classes/backlight/backlight.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/backlight/backlight.lua b/classes/backlight/backlight.lua index 500626f..f9f2b26 100644 --- a/classes/backlight/backlight.lua +++ b/classes/backlight/backlight.lua @@ -45,11 +45,11 @@ function P:backlight_up() return end - awful.spawn("xbacklight -inc 5", false) self.brightness = self.brightness + 5 if self.brightness > self.max_value then self.brightness = self.max_value end + self:backlight_set(self.brightness) self:_update_widget() end @@ -58,11 +58,11 @@ function P:backlight_down() return end - awful.spawn("xbacklight -dec 5", false) self.brightness = self.brightness - 5 if self.brightness < self.min_value then self.brightness = self.min_value end + self:backlight_set(self.brightness) self:_update_widget() end