Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

screen_brightness_control-0.24.2.tar.gz (46.7 kB view details)

Uploaded Source

Built Distribution

screen_brightness_control-0.24.2-py3-none-any.whl (36.2 kB view details)

Uploaded Python 3

File details

Details for the file screen_brightness_control-0.24.2.tar.gz.

File metadata

File hashes

Hashes for screen_brightness_control-0.24.2.tar.gz
Algorithm Hash digest
SHA256 96931b0d80ad3bd4449d35ce20d15d54f72c730bbfae43773464425d30a747a4
MD5 8a2acb7eebe56e198c6d99a79a587260
BLAKE2b-256 562dc0c4b224c5aa5467d392c632e4ad9dd6f0904c165a67aa58ab9e148ba075

See more details on using hashes here.

File details

Details for the file screen_brightness_control-0.24.2-py3-none-any.whl.

File metadata

File hashes

Hashes for screen_brightness_control-0.24.2-py3-none-any.whl
Algorithm Hash digest
SHA256 189add826705783eba71f2e9b4ca4dbdee5e327519aebd1854834ea5c75ae27f
MD5 0778bb7d9681fed9efed73aa4db843e0
BLAKE2b-256 c6bc829adc48e0ae392abb59a6d8f25e90ca6c150d5221b53dd4737f929ddced

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page