mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-24 18:58:33 +02:00
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:
parent
7b4de27bc8
commit
c6c6fca6d2
1 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ module("vbe/brightness")
|
|||
|
||||
local nid = nil
|
||||
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")
|
||||
if not out then return end
|
||||
|
||||
|
@ -29,9 +29,9 @@ local function change(what)
|
|||
end
|
||||
|
||||
function increase()
|
||||
change("+ 5")
|
||||
change("inc 5")
|
||||
end
|
||||
|
||||
function decrease()
|
||||
change("- 5")
|
||||
change("dec 5")
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue