Skip to content

Instantly share code, notes, and snippets.

View jaknas's full-sized avatar
:shipit:

Jakub Naskręski jaknas

:shipit:
  • Wrocław
View GitHub Profile
@jaknas
jaknas / adaptMonitorBrightness-M27Q.py
Last active June 1, 2024 18:11 — forked from wadimw/adaptMonitorBrightness-M27Q.py
Python script for MacOS which changes brightness of Gigabyte M27Q KVM Monitor to match current brightness of builtin MacBook Pro display; this is instead of Lunar app, because DDC/CI commands do not work for me over USB-C DisplayPort. Includes support for M1 Macs using DisplayServices API.
#!/usr/local/bin/python3
# For Gigabyte M27Q KVM connected over USB-C
#
# Reads brightness value of builtin display from system, adapts it (Lunar-style) and sends over USB command to external display
#
# You need PyUSB and PyObjC
#
# Not much testing was done so far, only on MBP A1990 15" 2019 i7 555X
#