Skip to content

Commit

Permalink
.osx: Only install custom Terminal profile once
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Amalthea Magnuson authored and mathiasbynens committed Jun 7, 2014
1 parent 3b364cf commit 3ece8ac
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .osx
Expand Up @@ -543,10 +543,14 @@ sudo mdutil -E / > /dev/null
defaults write com.apple.terminal StringEncodings -array 4

# Use a modified version of the Pro theme by default in Terminal.app
open "${HOME}/init/Mathias.terminal"
sleep 1 # Wait a bit to make sure the theme is loaded
defaults write com.apple.terminal "Default Window Settings" -string "Mathias"
defaults write com.apple.terminal "Startup Window Settings" -string "Mathias"
TERM_PROFILE='Mathias';
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;

# Enable “focus follows mouse” for Terminal.app and all X11 apps
# i.e. hover over a window and start typing in it without clicking first
Expand Down

0 comments on commit 3ece8ac

Please sign in to comment.