all repos — nixfiles @ b7be1fa6d865b963af6d212df87e09df33b228d5

System and user configuration, managed by nix and home-manager

replace theme.sh with custom Terminal profile switcher

Alin
commit

b7be1fa6d865b963af6d212df87e09df33b228d5

parent

fb01cdc53b6aaa83fb7df5c1fcb5fd1a93d63305

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)