brack

Crates.iobrack
lib.rsbrack
version0.3.0
sourcesrc
created_at2021-07-05 18:47:42.451754
updated_at2023-11-28 19:04:27.72685
descriptiontune backlight
homepage
repositoryhttps://github.com/gauteh/brack
max_upload_size
id419117
size10,313
Gaute Hope (gauteh)

documentation

README

Crates.io

brack

tune the backlight!

Change backlight brightness

brack [device] [change]

device (optional) the device to change backlight on (see /sys/class/backlight)
change (optional) absolute value in percent or change in percent prefixed with +/-.

no change will display current value.
no device will try to automatically determine device.

Examples:

brack +10 # increase brightness with 10%
brack -10 # decrease brightness with 10%
brack 50 # set brightness to 50%
brack intel_backlight +10 # increase brightness with 10% on the intel_backlight device

User access to the backlight

Replace <vendor> with the name in /sys/class/blacklight, e.g. acpi_video0 and add a udev rule, e.g.: /etc/udev/rules.d/backlight.rules:

ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="<vendor>", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="<vendor>", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"

and make sure you add the user to the video group:

$ sudo gpasswd -a $USER video
Commit count: 16

cargo fmt