In macOS's Terminal app, the default theme (Basic) adapts dynamically to system settings, but as soon as I customize the Basic theme from the preferences menu, it stops adapting. Is there a way to manually configure Terminal to look at the system mode and choose a theme appropriately?
macOS's Terminal app doesn't have a setting to dynamically pick a theme. However, when customizing a theme (or creating your own), you can pick colors that dynamically adapt to the OS.
When choosing colors, go to the third tab and, from the drop-down at the top, choose Developer. These colors will adapt automatically to the current system theme.
⚠️ Caveat: If you modify these colors in any way (even only their alpha transparency), they will stop adapting to the system theme.
For those who end up here looking for a way to change the terminal theme if your system is in Dark Mode, I did find this solution dark-mode-macos-safari-iterm-vim, you can default to a light theme and this will override with a dark theme when you launch Terminal in dark mode.
# Switch to Solarized Dark if we are currently in dark mode
if [[ "$(uname -s)" == "Darwin" ]]; then
val=$(defaults read -g AppleInterfaceStyle 2>/dev/null)
if [[ $val == "Dark" ]]; then
osascript -e 'tell application "Terminal"
set current settings of tabs of windows to settings set "Solarized Dark" # Theme name
end tell'
else
fi
fi
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With