LightScript is a "light" (read minimal) script that does one thing and does that thing well; Sets the screen brightness based off a value given in percent. It has the following features:
- Automatically finds the controller with the best resolution, and uses it to set the brightness.
- If sudo is installed, it attempts to use it. Since the script needs root, I thought it would be nice to skip the "sudo"-part when using it.
- Uses a minimum cap of 5% lightness as standard, which can be easily changed using the /etc/lightscript/minlight file. (Some controllers will turn the screen pitchblack on 0%)
- Is very forgiving on "bad systems", while still doing a lot of safety-checks.
- Brightness can now be changed dynamically with + & - operators!New!
Compatability & Support
Lightscript only has 1 dependency, and that is bash. It should be compatible with any linux-system really, but it was made on ArchLinux x86_64 and has a supported package
in the Arch User Repository, as well as a wiki-entry
on their official Wiki. The script also has a thread on both reddit
as well as the ArchLinux forums
where it can be discussed.
If you want to install this script on any other system(non-archlinux), I suggest you download the sourcefiles from the downloads below and extract it to /, and (optional) make a symlink to lightscript.sh:
ln -s /etc/lightscript/lightscript.sh /usr/bin/light