Skip to content

Latest commit

 

History

History
42 lines (22 loc) · 1.34 KB

README.md

File metadata and controls

42 lines (22 loc) · 1.34 KB

I-Brightness

i-brightness: Adjust Intel backlight screen brightness.

Why it's usefull

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.

Setup

go get /github.com/psimoesSsimoes/mbair-brightness

Usage

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

Bind it to a key

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.

Author

Pedro Simões (aka seomis)