Created
May 20, 2020 21:32
-
-
Save stevenvachon/f5050e7f8a7c672ea459636eb3f6d4bb to your computer and use it in GitHub Desktop.
Toggle between Terminal.app themes as macOS dark mode is changed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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