News for hackers. Stuff that matters.
Re:MonitorControl: Control external monitor brightness and v... by throwanem on Thursday July 09, 2020 @06:38PM (#23786079)
For a command-line option, ddcctl (https://github.com/kfix/ddcctl) works nicely in my experience, with a Dell Ultrasharp connected via USB-C.

I have a script hacked together to fetch the internal display's brightness once a minute and apply it, with a scaling factor, to the external, so that they're both effectively controlled by the laptop's ambient light sensor. It's really nice for working in a room with lots of windows.

A more batteries-included alternative, which appears to also provide brightness sync, is Lunar (https://lunar.fyi/). I haven't had a chance to try it, but the Github repo makes it look pretty solid.

Re:MonitorControl: Control external monitor brightness and v... by alin23 on Friday July 10, 2020 @04:09AM (#23789277)
Thanks for mentioning Lunar! I'm the developer of the app.

I've had a lot of feedback on it and users really helped me to fix most of the use cases so please give it a try. It has a lot of options to make it work just the way you want.

And if it doesn't, feel free to send me feedback. I'm still developing new features for it like weather aware adaptive brightness (for less brightness on those cloudy days), an external USB light sensor (for Mac Minis, clamshell mode Macbooks or even Hackintoshes) and a new curve fitting algorithm to better adapt the 0-100 curve when you adjust the brightness manually.

Re:MonitorControl: Control external monitor brightness and v... by throwanem on Friday July 10, 2020 @07:06AM (#23790263)
Would you expect Gatekeeper on High Sierra to just refuse to run a current build outright, without even the usual bypass options? I'm not sure if my IT department has been continuing the war against its own users, or maybe I've just put off updating too long.
Re:MonitorControl: Control external monitor brightness and v... by alin23 on Friday July 10, 2020 @07:14AM (#23790306)
Lunar is signed and notarized with a paid developer certificate so I don’t think gatekeeper could block it in anyway.

It’s possible that in High Sierra you are missing the Swift 5 runtime. You can find details about this in the troubleshooting section of the GitHub readme.

Here is the link where you can download an installer for that: https://support.apple.com/kb/DL1998?locale=en_US

Re:MonitorControl: Control external monitor brightness and v... by throwanem on Friday July 10, 2020 @11:08AM (#23792246)
That did the trick, thanks! Weird that the error details would talk about code signing when the problem was a missing runtime, but go figure.

I've switched over to using Lunar as of this morning, following the runtime install. Unfortunately, it looks like today's going to be cloudy straight through, so I don't know that I'll get the best opportunity to see the app strut its stuff right away. That said, the UX has been very solid thus far, and I like the extensive configurability even if I have no intention of using more than about 5% of it.

Strong recommend, and definitely worth a coffee!

Re:MonitorControl: Control external monitor brightness and v... by sidharthv on Friday July 10, 2020 @07:42AM (#23790504)
I wasn't sure if a Lenovo Monitor Plugged in via VGA to a Dell Dock to my MBP 13" would support DDC.

MonitorControl wasn't able to control my Brightness, it just set it to lowest level. This made me realise that there was some support to DDC, I tried trouble shooting using ddctl which was able to set the values, but not poll it.

Finally tried Lunar (https://lunar.fyi/) and it works like a charm. It's more of a set it and forget approach and has a unique UI.

Re:MonitorControl: Control external monitor brightness and v... by rolleiflex on Thursday July 09, 2020 @11:25PM (#23787847)
I did recently write a script to read the room brightness value from a Hue Light Sensor and adjust my external monitor brightness, with some smoothing applied. It was triggered by being stuck at home like everyone else.

Funny how similar thought processes can be sometimes. I’m now up to motorising my blinds so that the light sensor also controls the blinds to keep the room at the same light level through the day.

Re:MonitorControl: Control external monitor brightness and v... by throwanem on Friday July 10, 2020 @07:04AM (#23790247)
Not all that similar, I think. I did mine precisely so I can always keep the blinds open and also not get eyestrain.

I miss the roof deck at work. This time of year, weather and meeting schedule permitting, I'd typically spend somewhere between four and sixteen hours a week up there, enjoying the heat and watching ospreys, gulls, and the occasional peregrine while I waited for builds or test runs or whatever.

I think like many folks lately, I seem to have developed a touch of agoraphobia this year. But I need to at least be able to see outside, or I start to forget I exist.

Re:MonitorControl: Control external monitor brightness and v... by stevenguh on Thursday July 09, 2020 @10:52PM (#23787680)
I used lunar on a daily basis. It syncs the brightness of my display with my MacBook Pro display pretty well. Give it a try.
Re:MonitorControl: Control external monitor brightness and v... by tta on Friday July 10, 2020 @01:31AM (#23788450)
Thanks for the recommendation! I use ddcctl + an Alfred workflow[1], but Lunar looks much nicer!

[1]: https://storage.googleapis.com/ta-share/2020-07-10.11.01.02....

Re:MonitorControl: Control external monitor brightness and v... by andy_ppp on Friday July 10, 2020 @05:44AM (#23789729)
Could you share the script? I think lots of people would find it very useful!
Re:MonitorControl: Control external monitor brightness and v... by throwanem on Friday July 10, 2020 @07:12AM (#23790296)
No, but the only thing in it that isn't trivial or already discussed is the invocation for getting the internal display's current brightness values, which is this:

    ioreg -c AppleBacklightDisplay | grep brightness | cut -d= -f2- | perl -pe's@=@:@g'
(The cut and perl commands cause it to spit out a JSON blob, instead of the vaguely JSONish format ioreg gives you.)