Skip to content

psimoesSsimoes/i-brightness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

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)

Releases

No releases published

Packages

No packages published

Languages