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.

29 lines
1.3 KiB

2 years ago
  1. -- This file is part of Reno desktop.
  2. --
  3. -- Reno desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  4. --
  5. -- Reno desktop is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  6. --
  7. -- You should have received a copy of the GNU General Public License along with Reno desktop. If not, see <https://www.gnu.org/licenses/>.
  8. -- Who needs upower and xbacklight anyways?
  9. local syscontrol = require("syscontrol")
  10. local devices = syscontrol.power_supply.enumerate()
  11. for k,v in pairs(devices) do
  12. local data = syscontrol.power_supply.read_attribs(v)
  13. print("Device: ")
  14. for kk,vv in pairs(data) do
  15. print(kk,vv)
  16. end
  17. end
  18. local backlight_devices = syscontrol.backlight.enumerate()
  19. for k,v in pairs(backlight_devices) do
  20. local data = syscontrol.backlight.read_attribs(v)
  21. print("Backlight device: ")
  22. for kk,vv in pairs(data) do
  23. print(kk,vv)
  24. end
  25. if data.writable then
  26. syscontrol.backlight.set_brightness(data,data.max_brightness)
  27. end
  28. end