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 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

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

screen_brightness_control-0.27.1.tar.gz (48.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

screen_brightness_control-0.27.1-py3-none-any.whl (36.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for screen_brightness_control-0.27.1.tar.gz
Algorithm Hash digest
SHA256 c27f65a5eadc5a912cc4d26378b5b2b69346ab111639626417ad2de6b09dde6b
MD5 2840ebea7ce48212a0cfe44de93a8ec4
BLAKE2b-256 8bf840399a560a13e9dd059ad0953daea7bdef5004d048929a2f40c8ad76fac1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for screen_brightness_control-0.27.1-py3-none-any.whl
Algorithm Hash digest
SHA256 718ddf0a288fa6fa7f0b5f46358fa8ab9dd92a112d2a56575009db5b8d1f20d4
MD5 da9e5b362a0686742bc236b8fcc11274
BLAKE2b-256 866d4f34b48dc0a4504bdd1d4b124e6755a68886a977b9343526aa3fa9f959a4

See more details on using hashes here.

Supported by

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