adjust certain files in /sys, like brightness
Find a file
2025-07-07 13:58:09 -05:00
src init 2025-07-07 13:45:30 -05:00
.gitignore init 2025-07-07 13:45:30 -05:00
Cargo.lock init 2025-07-07 13:45:30 -05:00
Cargo.toml init 2025-07-07 13:45:30 -05:00
README.md clean up readme 2025-07-07 13:58:09 -05:00

sysadj: adjust slider-like things through /sys

Many things in /sys use a system of two files, one for current value, and one for maximum value.

This tool allows you to adjust these things in a convenient way.

For example, to increase brightness by 20%:

sysadj /sys/class/backlight/BACKLIGHT_NAME/{,max_}brightness +20%

Aliases can be defined for various devices:

backlight_name="$(ls -1 /sys/class/backlight | head -n 1)"
alias briadj="sysadj /sys/class/backlight/$backlight_name/brightness /sys/class/backlight/$backlight_name/max_brightness"
briadj 100% # set brightness to maximum
``

Similar things can be done for things like keyboard backlight.