Skip to content

Instantly share code, notes, and snippets.

@tydavis
Last active May 10, 2023 14:12
Show Gist options
  • Save tydavis/2766dc70a0224938fd7480b225f3d684 to your computer and use it in GitHub Desktop.
Save tydavis/2766dc70a0224938fd7480b225f3d684 to your computer and use it in GitHub Desktop.
applescript-changeTerminal-autodarkmode
tell application "System Events" to tell appearance preferences to set whatMode to the (get dark mode)
if (whatMode = true) then
tell application "Terminal" to set default settings to settings set "gruvbox-dark"
tell application "Terminal"
set current settings of every window whose visible is true to settings set "gruvbox-dark"
end tell
else
tell application "Terminal" to set default settings to settings set "gruvbox-light"
tell application "Terminal"
set current settings of every window whose visible is true to settings set "gruvbox-light"
end tell
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment