Easily toggle between light and dark mode in macOS Mojave
Apple has added a new dark mode, Dark Aqua, to macOS Mojave. Since there’s currently no easy way to toggle between the two modes, I’ve created a button you can add to your MacBook Pro’s Touchbar that allows you to quickly move from and to the dark side.
Steps
- Create a Contextual Workflow in Automator and add the code below.
- Set the input to none, and pick a good icon.
- Save the workflow and give it a clear name like Dark Mode.
- Go to System Preferences > Extensions and choose Touch Bar.
- Enable your newly created workflow
- Go to System Preferences > Keyboard and choose Customize Controlstrip
- Drag the Workflow button to your Touchbar
The code
tell application "System Events" tell appearance preferences set dark mode to not dark mode end tell end tell
Screenshots