A Python tool to control monitor brightness on Windows and Linux
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
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
Close
Hashes for screen_brightness_control-0.15.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e3a7e4c113ea8e096e90ac6f22680dc72671f05476b1e4d358c199d7d595921 |
|
MD5 | 4739d992f594aee7d8cfc1b23fd64452 |
|
BLAKE2b-256 | 7c62e9e5412645e4cce03a59a0c1d2bcabd5c845c85e1ca869fbd7d87f8982ee |
Close
Hashes for screen_brightness_control-0.15.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 607d10577785b36aafa19ba2b198335b4da77cdb35e08021922285464ab646b3 |
|
MD5 | 30c42f10fd0885a9e0739c7e4f48b9c4 |
|
BLAKE2b-256 | 815414ae8814d31c26feed2235029fd512e9255f9bee9a06b0fa553d29af3677 |