Command line utility for changing the display brightness under linux.
You can download the latest binary file here. Unzip it in a directory of your choice (ideally in your PATH, e.g. in /home/yourname/.local/bin).
If you don't want to give root permissions to blight everytime you run it, execute sudo ./give_permissions.sh /path/to/blight
.
This gives blight permissions to edit the linux brightness
file.
You'll need to have Stack installed.
$ git clone https://github.com/juril33t/blight.git
$ cd blight
$ stack install
$ sudo ./give_permissions $(which blight) # (*)
Step (*) is optional. It gives permissions to blight for setting the display brightness. If you skip this step, you'll have to execute blight as root.
Usage: blight COMMAND [-r|--relative] [-m|--max-brightness-file FILE]
[-f|--brightness-file FILE]
Manipulate display brightness
Available options:
-r,--relative Using relative display brighness (as oppossed to the
internal representation)
-m,--max-brightness-file FILE
The file containing the maximum brightness (default:
/sys/class/backlight/intel_backlight/max_brightness)
-f,--brightness-file FILE
The file containing the current brightness (default:
/sys/class/backlight/intel_backlight/brightness)
-h,--help Show this help text
Available commands:
show Show current display brightness
max Show maximum display brightness
set Set display brightness
inc Increase display brightness
dec Decrease display brightness
$ blight set 100 -r
$ blight set 50 -r
$ blight dec 5 -r
$ blight inc 300
$ blight show # using internal units
$ blight show -r # or using percents
$ blight max