Reno is the second iteration of the AWMTK-powered AwesomeWM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
664 B

-- Who needs upower and xbacklight anyways?
local syscontrol = require("syscontrol")
local devices = syscontrol.power_supply.enumerate()
for k,v in pairs(devices) do
local data = syscontrol.power_supply.read_attribs(v)
print("Device: ")
for kk,vv in pairs(data) do
print(kk,vv)
end
end
local backlight_devices = syscontrol.backlight.enumerate()
for k,v in pairs(backlight_devices) do
local data = syscontrol.backlight.read_attribs(v)
print("Backlight device: ")
for kk,vv in pairs(data) do
print(kk,vv)
end
if data.writable then
syscontrol.backlight.set_brightness(data,data.max_brightness)
end
end