/macos-darkmode

Simple CLI for controlling macOS Dark Mode via Apples private API

Primary LanguageGoMIT LicenseMIT

macos-darkmode

Your friendly neighbordhood macOS Dark Mode CLI. Dark Mode is set via Apples private APIs instead of the usual Apple Script.

Tested on macOS Mojave (10.14).

Installing

$ go get -u github.com/mafredri/macos-darkmode/cmd/darkmode

Usage

Get current Dark Mode

$ darkmode
on

Set Dark Mode

$ darkmode on
$ darkmode off
$ darkmode toggle

Why?

Sometimes setting Dark Mode via Apple Script just doesn't work, I wanted a more reliable method.

See also

Thanks

Thanks to Saagar Jha for discovering the private APIs and sharing them in his post on Scheduling Dark Mode.