summaryrefslogtreecommitdiff
path: root/.local/bin/theme
blob: c6f0c2ce98915c8a49ec5f424bfff4ea50d66c70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/zsh
# 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 "PaperColor-dark" # Theme name
    end tell'
  else
    osascript -e 'tell application "Terminal"
      set current settings of tabs of windows to settings set "PaperColor-light" # Theme name
    end tell'
  fi
fi