Switch Between Dark And Light Mode On Your Mac With This Shortcut

One of the best parts of macOS, introduced in Mojave, is the operating system’s Dark Mode. It’s a system-wide trigger that gives you a gloomier colour theme across your core Mac apps and any third-party apps that support the feature — and I think it’s a lot easier on the eyes, but maybe that’s just me.

Upgrade to macOS Catalina, and you’ll even get an extra setting — “auto” — that will switch your system between Light and Dark mode based on the time. But what if you want manual control over which “mode” you’re using? It’s a pain in the arse to have to navigate through System Preferences to switch between Light and Dark mode. Instead, with a little creativity, you can set up a keyboard shortcut that will warp you between these two worlds faster than Link’s Magic Mirror.

Setting up a keyboard shortcut to toggle dark and light mode in macOS

To get started, pull up the Automator app within macOS. Click on File > New, and select Quick Action from the menu that appears:

In the next screen, set the first drop-down for “Workflow receives current…” from “Automatic (text)“ to “no input.”

Then, click on the little search box above “Activate Fonts” in the second column. Type in “Apple,” and double-click on “Run AppleScript. Delete all the purple text in the box that appears and enter this instead (courtesy of AppleInsider):

tell application "System Events"

tell appearance preferences

set dark mode to not dark mode

end tell

end tell

You should now be able to click on the “Play” icon above the first line of text, and doing so should flip your system from Dark mode to Light mode (and back again). Save your Quick Action (via Command + S) and give it a name you’ll remember later (in one minute).

Quit Automator and pull up System Preferences. Open Keyboard and click on the Shortcuts tab. Click on “Services” in the left column, and then scroll down the right column to find your new Quick Action—likely under “General.” Assign it a keyboard shortcut by clicking on “none,” then “Add Shortcut,” then whatever key or keys you want to use to trigger Dark Mode on and off.

If this is your first time setting something like this up, you’ll also likely be asked for some kind of permission. Makes sure you accept that or your hotkey setup won’t work.


Leave a Reply