Dark theme

Soon Mac osx will get a dark themed UI, but how to port this feature also to older versions of Mac osx?

It’s known that screens (displays from phone tablet and computer) emit blue light, which tells our body to stay awake. Which in turn influences “our power management” badly, and our sleep will be shallow and our awakening with bad mood and low power.

Of course we can download applications like screen dimmers which add a layer of black or orange to our screens, but I’d like to have a script which regulates the brightness of our screen automatically, as I work late and I need to do brightness adjustments always manually.

Setting the brightness is possible through shell scripting but that needs special permissions.
Isn’t it possible to use ApplescriptObjC instead, but without the hassle to insert passwords?

Simply, it can’t be done. It takes significant work for any application to support it properly.

Hello Shane,
Maybe my intro sounded too provocative.
But I think you have read my whole post, therefore ASObjC will struggle in the same way as shell script to manipulate screen brightness - always asking for a password…

I don’t think it will even get that far.

You can try that:

do shell script "defaults write NSGlobalDomain NSWindowDarkChocolate -boolean YES"

… and restart your Mac (or the Finder and the applications)

This hidden function is an incomplete implementation of the Dark Mode of macOS Mojave. However, this mode doesn’t work very well—many interface elements appear incomplete; there are mismatched colors; some fonts are not colored correctly; and there are other visual issues.

Cancel the modification with:

do shell script "defaults delete NSGlobalDomain NSWindowDarkChocolate"