screen_brightness_control
A Python tool for controlling the brightness of your monitor. Supports Windows and most flavours of Linux.
Installation
Pip:
pip install screen-brightness-control
GitHub:
git clone https://github.com/Crozzers/screen_brightness_control
cd screen_brightness_control
pip install .
Linux:
Installing on Linux usually requires some extra work after installing the module. Please see the installing on Linux documentation for more details.
Usage
API
import screen_brightness_control as sbc
# get the brightness for all displays
brightness = sbc.get_brightness()
# get the brightness for the primary display only
primary = sbc.get_brightness(display=0)
# set the brightness to 100% for all displays
sbc.set_brightness(100)
# set the brightness to 100% for the primary display only
sbc.set_brightness(100, display=0)
# fade the brightness down to 70% for all displays
sbc.fade_brightness(70)
# show the current brightness for each detected display
for display in sbc.list_monitors():
print(display, ':', sbc.get_brightness(display=display), '%')
Check out the quick start guide for more details on each of these functions.
Full documentation for the project is also available here.
Command Line
python -m screen_brightness_control --help
> usage: screen_brightness_control [-h] [-d DISPLAY] [-s VALUE] [-g] [-f VALUE] [-v]
>
> optional arguments:
> -h, --help show this help message and exit
> -d DISPLAY, --display DISPLAY the display to be used
> -s VALUE, --set VALUE set the brightness to this value
> -g, --get get the current screen brightness
> -f VALUE, --fade VALUE fade the brightness to this value
> -m METHOD, --method METHOD specify which method to use
> -l, --list list all monitors
> -v, --verbose some messages will be more detailed
> -V, --version print the current version
Contributing
Contributions are welcome. Issues, ideas and pull requests are all appreciated. For more information see here
See Also
Metadata
Release files for screen-brightness-control 0.27.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| screen_brightness_control-0.27.2.tar.gz | 48.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| screen_brightness_control-0.27.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 85.1 kB
Release files / screen_brightness_control-0.27.2.tar.gz
| Download URL | screen_brightness_control-0.27.2.tar.gz |
|---|---|
| Size | 48.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fd21a05025f644447ea267ef24b150bb1f5c9b47199c1e51e9aded3c6e918cc
|
|
BLAKE2b-256 checksum How to use checksums |
fe1463ecad8a54736a5955b6684a91f093e8e7c45207ad0a3be96a951d83d203
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / screen_brightness_control-0.27.2-py3-none-any.whl
| Download URL | screen_brightness_control-0.27.2-py3-none-any.whl |
|---|---|
| Size | 36.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3093e657d9aed9a1d367fd968c871fbdb918e5c31b7a34766c19684c783c4371
|
|
BLAKE2b-256 checksum How to use checksums |
1e2b364f92eda305072b486bf37827ea25a163281998faeaaa3c11e4a12b7f53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for screen-brightness-control 0.27.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.