MacOS dark mode keyboard shortcut


Add script to Automator

  1. Open automator
  2. File -> New (might already be open if you don’t have any)
  3. Select Quick Action
  4. Select No input from any application
  5. Find Run Applescript in the list of actions on the left
  6. Paste in the snippet below
  7. Save as DarkModeToggle
on run {input, parameters}
	
	tell application "System Events"
		tell appearance preferences
			set dark mode to not dark mode
		end tell
	end tell
	
	return input
end run

Add the keyboard shortcut

  1. Open System Settings
  2. Select Keyboard
  3. Press Keyboard Shortcuts... button
  4. Select Services
  5. Open General
  6. DarkModeToggle should be listed.
  7. Click on none next to DarkModeToggle
  8. Type the shortcut you want to use (my choice is Control + Tilde, ⌃~)

source - script needed tweaking

Date: 2025-04-29

Tags:  macos

Share: