Skip to main content

Brightify

CodeFactor

This app allows you to set the brightness of your monitor(s). It is essentially a wrapper around the DDC/CI protocol, which is supported by most modern monitors. It also supports adding custom communication protocols to control the brightness of Monitors connected via USB. You can find an example implementation for the Gigabyte M27Q in here. The app is designed to be run in the background and can be controlled via a taskbar icon. It also supports a brightness sensor that can automatically adjust the brightness based on the ambient light.

Getting started

  1. Install brightify by running pip install Brightify. This package is regularly uploaded to PyPi. If you want to install the latest version, you can clone this repository from GitHub and install it with pip install -e . in the root directory.
  2. To start the app: python -m brightify run. You can exit either by right-clicking the icon in the taskbar and selecting "Exit" or by pressing Ctrl+C in the terminal.
  3. To start the app at startup (or logon) and add a menu icon, run python -m brightify add all. To remove the both, run python -m brightify remove all.

Additional requirements for Linux

As the DDC/CI protocol requires write access to the /dev/i2c-* devices, you need to add your user to the i2c group (or run the script as the root user).

  • First, verify that the group exists by running getent group i2c.
    • If it does not exist, you need to create it by running sudo groupadd i2c and also assign the i2c devices to the group by running sudo chown root:i2c /dev/i2c-*.
  • Now you can add your user to the group by running sudo usermod -aG i2c $USER. Verify that the user is in the group by running groups $USER and checking if i2c is listed. If running groups does not show i2c, you need restart the system.
  • Finally, you might need to change the permissions of the /dev/i2c-* so that the group has read/write access. You can do this by running sudo chmod g+rw /dev/i2c-*.
    • If this change is not permanent you can create a udev rule by creating a file in /etc/udev/rules.d/ with the content KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660".
    • After creating the file, you need to reload the udev rules by running sudo udevadm control --reload-rules && sudo udevadm trigger.
  • To remove the user from the group, run sudo deluser $USER i2c.

Optional arguments

There are several other arguments you can pass to the app, see python -m brightify --help for more information.

  • To target add/remove only the startup run python -m brightify add/remove startup.
    • To add a task to the task scheduler on Windows, pass --use-scheduler. It will request elevated permissions.
  • To add/remove only the menu icon run python -m brightify add/remove menu-icon.
  • By default, the terminal will be hidden, but you can change this by passing the --force-console argument to the run or add action.
  • To disable animations, pass the --no-animations argument to the run or add action.

Set up the brightness sensor

  • Modify the SensorComm class to match your device and firmware
  • Modify the code that is polling from the brightness sensor Device Firmware
  • Modify platformio.ini and enter your board ( see supported boards)
  • Run pio run -t upload in the terminal to upload the firmware to the board. If everything is working, the Auto Checkbox for each supported Monitor should now be clickable

Remarks

  • Currently, only the Windows task bar icon is supported, the main part of this app is OS independent.
  • Feel free to create a pull request and add your own USB Monitor
  • Note that a USB Monitor will replace a DDC/CI Monitor with the same name. If you want to use both, you need to change the name of your USB Monitor implementation. In case a monitor is found but does not send its name, we cannot distinguish between DDC/CI and USB Monitors. In this case, both will be added.

Metadata

Release files for Brightify 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Brightify 0.1.13
File Size Uploaded
brightify-0.1.13.tar.gz 41.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Brightify 0.1.13
File Interpreter ABI Platform
Brightify-0.1.13-py3-none-any.whl Python 3 none any Details

Total release size: 91.6 kB

Release files / brightify-0.1.13.tar.gz

Download URL brightify-0.1.13.tar.gz
Size 41.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4d2296889bb32e166829582a2984bb073b58173cbb8617362d59f5959cd2282c
BLAKE2b-256 checksum
How to use checksums
2cf12f3aaa337c7bac97345f53290071328ca42903da7dbe70a780cae9d003e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.5

Release files / Brightify-0.1.13-py3-none-any.whl

Download URL Brightify-0.1.13-py3-none-any.whl
Size 50.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a6fca82a3202b8ca6c7a1cf62ae39b781a3a38ae580a3d78fac1403317b0642
BLAKE2b-256 checksum
How to use checksums
be71ebb75e0fb089937b36a573c98df8204f2bed05f87a45d9ee27ed07a595c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.1.13 This release

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page