replace theme.sh with custom Terminal profile switcher
1 file changed, 29 insertions(+), 0 deletions(-)
changed files
A scripts/terminal/set-terminal-theme.applescript
@@ -0,0 +1,29 @@ +global lightProfile, darkProfile + +set lightProfile to "Flexoki Light" +set darkProfile to "Flexoki Dark" + +to getTargetProfile() + tell application "System Events" + set isDark to dark mode of appearance preferences + end tell + if isDark then + return darkProfile + else + return lightProfile + end if +end getTargetProfile + +to setTerminalProfile(targetProfile) + tell application "Terminal" + set default settings to settings set targetProfile + set startup settings to settings set targetProfile + + repeat with existingWindow in windows + set current settings of existingWindow to settings set targetProfile + end repeat + end tell +end setTerminalProfile + +getTargetProfile() +setTerminalProfile(result)