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.14.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec0f4c66e1b981d8726b2e7af4af684678ce99bc01d90a6ffe8d9c188f586456 |
|
MD5 | 90d727ae9601c00e8ea960b1cef030fd |
|
BLAKE2b-256 | c9720d2318a22ee85b2f7c00aa3220933571dbf6b3f949a90dd246cc5c36a335 |
Close
Hashes for screen_brightness_control-0.14.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b0680c8c9a2b49f609b5033d4d7d52bfe66eea46a393bec262ff5166e8c2ee9 |
|
MD5 | ffb54ac6197c62b0e9f16a484f1495ff |
|
BLAKE2b-256 | b685462ffa7215a3c0e4663369e2b85b4fbe5dce02938d30e02bfc86b917a80d |