Get / set screen brightness on linux systems (via sysfs)

Installation

go install github.com/angelodlfrtr/[email protected]

Non-root users cannot by default write to /sys/class, to allow other users :

sudo chown root $GOPATH/bin/brightctrl
sudo chmod u+s $GOPATH/bin/brightctrl

Usage

# Print help
brightctrl --help

# Get current brightness
brightctrl

# Get current brightness in raw
brightctrl -raw

# Set current brightness in percent
brightctrl -set 50

# Set current brightness in raw
brightctrl -set 488 -raw

GitHub

View Github