summaryrefslogtreecommitdiff
path: root/scripts/theme
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2024-12-05 13:49:22 -0500
committerJacob McDonnell <jacob@jacobmcdonnell.com>2024-12-05 13:49:22 -0500
commitf8d09c5cfd6d1d9595b64547dc9d29c63e40c5f2 (patch)
tree0dd9cfa47cfa0bd4d57d7789439cc86afbbdfa85 /scripts/theme
parent29b1c791f6e319cdab828cee5f491ca1c38e41d1 (diff)
Moved .local/bin to scripts
Diffstat (limited to 'scripts/theme')
-rwxr-xr-xscripts/theme14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/theme b/scripts/theme
new file mode 100755
index 0000000..c6f0c2c
--- /dev/null
+++ b/scripts/theme
@@ -0,0 +1,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