Skip to content

Instantly share code, notes, and snippets.

View wadimw's full-sized avatar

Wadim Wawrzeńczak wadimw

  • Poland
  • 20:37 (UTC +01:00)
View GitHub Profile
@wadimw
wadimw / adaptMonitorBrightness-M27Q.py
Last active September 29, 2024 00:04
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
#!/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
#