From ed4daf7429bf2580118aad87b8f3e2011efed7ec Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Thu, 14 Jul 2022 19:09:06 -0400 Subject: Initial commit --- .local/bin/theme | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 .local/bin/theme (limited to '.local/bin/theme') diff --git a/.local/bin/theme b/.local/bin/theme new file mode 100755 index 0000000..c6f0c2c --- /dev/null +++ b/.local/bin/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 -- cgit v1.2.3