MacOS dark mode keyboard shortcut


Add script to Automator

  1. Open automator
  2. Select Quick Action
  3. Select No input from any application
  4. Find Run Applescript in the list of actions on the left
  5. Paste in the snippet below
  6. 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

source - script needed tweaking

Date: 2025-04-29

Tags:  macos

Share: