A Python tool for controlling the brightness of your monitor
Project description
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
brightness = sbc.get_brightness()
# get the brightness for the primary monitor
primary = sbc.get_brightness(display=0)
# set the brightness to 100%
sbc.set_brightness(100)
# set the brightness to 100% for the primary monitor
sbc.get_brightness(100, display=0)
# show the current brightness for each detected monitor
for monitor in sbc.list_monitors():
print(monitor, ':', sbc.get_brightness(display=monitor), '%')
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file screen_brightness_control-0.24.1.tar.gz
.
File metadata
- Download URL: screen_brightness_control-0.24.1.tar.gz
- Upload date:
- Size: 46.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08e950c82bda957193b4757312af2fc326f867605e69353f0a051bc334b84b13 |
|
MD5 | 5e2115dab21ddefeb4cd51d55d90089a |
|
BLAKE2b-256 | 0dd863b484322a5d021831013c3671b2bc3f887822eb4fd40d428c0f4b9839d3 |
File details
Details for the file screen_brightness_control-0.24.1-py3-none-any.whl
.
File metadata
- Download URL: screen_brightness_control-0.24.1-py3-none-any.whl
- Upload date:
- Size: 36.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c5af335704c52ebcc4641ea02092e4f887cfeae16c386e89ad882ddb48e5343 |
|
MD5 | aa027cde8c96e75bf619219c148cd90b |
|
BLAKE2b-256 | b7562adeea598860171fb4af9c3dac03b8f8e1ec3fd6972a72e186976f7a5831 |