Improved backlight management
parent
31860921fa
commit
40c26c2d7e
|
@ -45,11 +45,11 @@ function P:backlight_up()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
awful.spawn("xbacklight -inc 5", false)
|
|
||||||
self.brightness = self.brightness + 5
|
self.brightness = self.brightness + 5
|
||||||
if self.brightness > self.max_value then
|
if self.brightness > self.max_value then
|
||||||
self.brightness = self.max_value
|
self.brightness = self.max_value
|
||||||
end
|
end
|
||||||
|
self:backlight_set(self.brightness)
|
||||||
self:_update_widget()
|
self:_update_widget()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -58,11 +58,11 @@ function P:backlight_down()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
awful.spawn("xbacklight -dec 5", false)
|
|
||||||
self.brightness = self.brightness - 5
|
self.brightness = self.brightness - 5
|
||||||
if self.brightness < self.min_value then
|
if self.brightness < self.min_value then
|
||||||
self.brightness = self.min_value
|
self.brightness = self.min_value
|
||||||
end
|
end
|
||||||
|
self:backlight_set(self.brightness)
|
||||||
self:_update_widget()
|
self:_update_widget()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue