brightness: control brightness

On the X1, the brightness is controlled by the OS. On other machines, if
it is not, we will double the requested changes. We can live with that.
This commit is contained in:
Vincent Bernat 2014-06-11 17:25:47 +02:00
parent 7b4de27bc8
commit c6c6fca6d2

View file

@ -14,7 +14,7 @@ module("vbe/brightness")
local nid = nil local nid = nil
local function change(what) local function change(what)
-- We don't really change the brightness, just report the change... os.execute("xbacklight -" .. what)
local out = awful.util.pread("xbacklight -get") local out = awful.util.pread("xbacklight -get")
if not out then return end if not out then return end
@ -29,9 +29,9 @@ local function change(what)
end end
function increase() function increase()
change("+ 5") change("inc 5")
end end
function decrease() function decrease()
change("- 5") change("dec 5")
end end