Open WrathOP opened 1 year ago
I have the solution, setBrightness
also doesn't work on macOS 13.0 Ventura
, I can propose using this code for setup screen brightness, function IKMonitorBrightnessController
, bellow script:
from Quartz import IKMonitorBrightnessController
def setBrightness(level: float):
success = IKMonitorBrightnessController.alloc().setBrightnessOnAllDisplays_(level)
if not success is None:
raise ValueError()
setBrightness(0.5)
However, this script set brightness for all displays, but I count it is alternative solution
I wanted to use this code for my project as I am unable to find a way to change the macos brightness from python and this library is one caught my eye but it clearly doesnt support changing main display brightness , or I am just understanding it wrong.