-
Notifications
You must be signed in to change notification settings - Fork 151
How to sync brightness of main display with secondary
Anton Konovalov edited this page Jun 29, 2021
·
2 revisions
- Install the binary to
/usr/local/bin/ddcctl
- Run
mkdir -p ~/Library/LaunchAgents
curl -o ~/Library/LaunchAgents/com.zerowidth.launched.sync-brightness.plist http://launched.zerowidth.com/plists/3902c360-bb27-0139-1649-5da0311d64fa.xml
launchctl load -w ~/Library/LaunchAgents/com.zerowidth.launched.sync-brightness.plist
This will create an agent which will sync the brightness once per minute.
You can create & configure your own plist using following script:
/usr/local/bin/ddcctl -d 1 -b $(\
ioreg -c AppleBacklightDisplay \
| grep \"brightness\" \
| sed -nE 's/.*"brightness"={"min"=([[:digit:]]+),"max"=([[:digit:]]+),"value"=([[:digit:]]+)}.*/scale=10; \3\/\2*100/p' \
| bc\
)