i-brightness: Adjust Intel backlight screen brightness.
I'll give you my example:
On a Macbook Air 2015 the keyboard brightness controls don't work automatically (as far as Fedora 27 ,anyway). This model uses an Intel graphics card and you can manually adjust the brightness on the CLI, as root, by echoing the number into /sys/class/backlight/intel_backlight/brightness. This script is a helper that does exactly that.
go get /github.com/psimoesSsimoes/mbair-brightness
set : set brigthness manually. Accepted values between 90 and 1280
up : increase brigthness by 1
down : decrease brightness by 1
by precaution up ,down and set always stay in values far from maximum and minimum allowed by Intel
i always use tilted WM like awesome or i3. For those, use xevto discover the id's of the keys you want to map.
Having that, bind the keys with the generated binary.
i3 example:
bindsym <key_id> exec "sudo ~/go/bin/./mbair-bright up"
bindsym <key_id> exec "sudo ~/go/bin/./mbair-bright down"
if your configuration doesn't execute sudo without asking the password, then you can use capabilities to give permissions to mbair-bright binary.
Pedro Simões (aka seomis)