~tk/brightness

A basic log-scale sysfs brightness adjuster
Initial release 1.0.0

clone

read-only
https://git.sr.ht/~tk/brightness
read/write
git@git.sr.ht:~tk/brightness

You can also use your local clone with git send-email.

#brightness

A basic logarithmic scale sysfs brightness adjuster

#Usage

Increase by 10%:

# brightness /sys/class/backlight/your_backlight +10

Decrease by 6.25%:

# brightness /sys/class/backlight/your_backlight -6.25

Set to 50%:

# brightness /sys/class/backlight/your_backlight 50

For more information, read the brightness(1) man page.

#Building and Installation

While the package itself has no dependencies outside of python 3.4, the build and installation process depends on install, scdoc and the build and installer python packages.

To generate the man page run scdoc <brightness.1.scd >brightness.1

To generate the wheel run python -m build --wheel

To install the resulting files run:

$ python -m installer --destdir "$destdir" --prefix "$prefix" dist/*.whl
$ install -Dm644 brightness.1 "$destdir$prefix/share/man/man1/brightness.1"

Please note, using the installer from a venv will result in the brightness script inheriting the venv python interpreter path. If this is undesirable, edit the script after installation or don't use a virtualenv for the installer.

#Contributing

Please add tests where appropriate. To run the unit tests run python -m unittest.

Please use black and isort to format the code.

While I consider this project feature-complete, new features will be considered assuming they are easy to maintain and are not breaking changes. Adding new dependencies is considered a breaking change.