From 1f6ead4fca779e498672a39403aa6926280fdfa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C4=83t=C4=83lin=20Mari=C8=99?= Date: Wed, 4 Feb 2015 20:03:34 +0200 Subject: .osx: Fix code that sets the custom terminal theme Fix the `.osx` script so that it correctly sets the custom terminal theme, and the change will be persistent. Closes #492. --- .osx | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/.osx b/.osx index d38fb9e..080854b 100755 --- a/.osx +++ b/.osx @@ -564,14 +564,51 @@ sudo mdutil -E / > /dev/null defaults write com.apple.terminal StringEncodings -array 4 # Use a modified version of the Solarized Dark theme by default in Terminal.app -TERM_PROFILE='Solarized Dark xterm-256color'; -CURRENT_PROFILE="$(defaults read com.apple.terminal 'Default Window Settings')"; -if [ "${CURRENT_PROFILE}" != "${TERM_PROFILE}" ]; then - open "${HOME}/init/${TERM_PROFILE}.terminal"; - sleep 1; # Wait a bit to make sure the theme is loaded - defaults write com.apple.terminal 'Default Window Settings' -string "${TERM_PROFILE}"; - defaults write com.apple.terminal 'Startup Window Settings' -string "${TERM_PROFILE}"; -fi; +osascript <