Skip to content

Instantly share code, notes, and snippets.

@stevenvachon
Created May 20, 2020 21:32
Show Gist options
  • Save stevenvachon/f5050e7f8a7c672ea459636eb3f6d4bb to your computer and use it in GitHub Desktop.
Save stevenvachon/f5050e7f8a7c672ea459636eb3f6d4bb to your computer and use it in GitHub Desktop.
Toggle between Terminal.app themes as macOS dark mode is changed
# I put this within an *.app file via Automator and added it to my user's "Login Items"
# It sets the theme every 5 minutes
repeat
tell application "System Events"
if dark mode of appearance preferences is true then
set terminalTheme to "custom_dark"
else
set terminalTheme to "custom_light"
end if
end tell
tell application "Terminal"
# New windows/tabs
set default settings to settings set terminalTheme
# Existing windows/tabs
set current settings of tabs of windows to settings set terminalTheme
end tell
delay 300
end repeat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment