Open thiagokokada opened 5 years ago
Tested:
adjust_method
set to xbacklight
, light
and default (None
).format_no_backlight
set to empty string.@enkore
Can anyone help review/merge this? xbacklight
only works with Intel (according to ArchWiki) so I can't utilize this plugin to adjust my AMD laptop. Thanks!
This PR introduces support to Light (https://github.com/haikarainen/light) support in
backlight
module, as a alternative program to control backlight. It uses sysfs files and udev rules instead of through a X protocol likexbacklight
, so it works in non-X environments (for example, insway
). Also, it seems more reliable and works wherexbacklight
does not work (like when usingxf86-modesetting
instead ofxf86-video-intel
driver).It is already supported in the official repositories in multiple distros (like Arch, Fedora and NixOS), so it seems to be a much better supported alternative than other programs that do something similar (like https://github.com/wavexx/acpilight/).
Since this needs to be explicitly set by the user now, I removed the check for the binary. If the user sets
adjust_method
to eitherxbacklight
orlight
, it just assumes that eitherxbacklight
orlight
is installed. However, setting it wrong does not bring any problems either (except the inability to change brightness, of course).This PR also allows the user to set
format_no_backlight
to empty string and hide backlight module in case the system does not have a backlight (i.e.:, again, in a Desktop). If you set to an empty string nowadays it results the same output as the default one, resulting in something like Brightness: -1 output.Substitutes PR https://github.com/enkore/i3pystatus/pull/747.