/ultrafine-auto-brightness

Automatically set brightness of an LG UltraFine 4k monitor

Primary LanguageObjective-CMIT LicenseMIT

About

This is a small command line tool that automatically adjust the brighness of LG UltraFine 4k monitor. Despite the fact that Apple collaborated on the monitor and it has an ambient light sensor, macOS 10.14 still does not support automatic brightness control; frustrating 😡.

I found

and combined them to this small tool.

How to build

First clone the repository. Then,

$ git submodule update --init
$ xcodebuild -derivedDataPath build -configuration Release -scheme ultrafine-auto-brightness clean build

The executable ultrafine-auto-brighness can be found in build/Build/Products/Release. Put the executable under /usr/local/opt. Copy com.qvacua.ultrafine-auto-brightness.plist to ~/Library/LaunchAgents and load it using

$ launchctl load -w ~/Library/LaunchAgents/com.qvacua.ultrafine-auto-brightness.plist

It works on my machine; your mileage may vary.