adjust certain files in /sys, like brightness
- Rust 100%
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
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.