Trigger Request: Change in Dark Mode

Hi Maestros,

My feature request is for a new trigger that would be called when the macOS dark mode changes from light to dark and vice versa.

I think this would be particularly useful for StreamDeck owners like me. In my case, I've got a 'toggle dark mode' button that should change appearance to match the system dark mode. That's difficult to keep in sync when the system dark mode can change without input from the Stream Deck, and polling is a fairly clunky solution.

Many thanks, especially to Peter and the team for all their great work.

Sam

Hey Sam,

Welcome to the forum!   :smile:

Interesting idea. I know there's a way for apps to discover that system setting – I don't know if the system broadcasts a notification when it changes.

But I reckon @peternlewis does.

-Chris

Yes, a trigger for dark/light change is on the todo list already.

Thanks.

4 Likes

Right you are, Chris!

It's pretty straightforward to get the current appearance with a simple AppleScript. Brett Terpstra has the details, as ever. Having a Keyboard Maestro trigger is going to be next-level useful!

Many thanks for the warm welcome. First time poster, long time lurker.

Sam

1 Like

Roger that, Peter. Looking forward to it.

Sam

This is done for the next major version.

3 Likes

Hi Peter
I am looking for something like this, an action that will recognize the status of systems dark mode or not, I am not able to locate it in Actions, I run KM 9.2
if it is there pls advise the nam of function, and if its the pipeline, do you have a schedule for release?

Palle

See the DARKMODE function, which you can use with the Calculation condition.

This is available from version 9.0 up, so you should already have it.

2 Likes

Eureka Peter!

I have lived just by Actions, now I have Functions too… :cowboy_hat_face:

Tested it by this which works perfectly:

3 Likes