blob: a187f0b5e5d19973a28ae9c50d56595bf24570c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# brightness
A basic logarithmic scale sysfs brightness adjuster
# Usage
Increase by 10%:
```shell
# brightness /sys/class/backlight/your_backlight +10
```
Decrease by 6.25%:
```shell
# brightness /sys/class/backlight/your_backlight -6.25
```
Set to 50%:
```shell
# 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:
```shell
$ 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.
|