-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathterminal.sh
More file actions
29 lines (22 loc) · 932 Bytes
/
terminal.sh
File metadata and controls
29 lines (22 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
function CFPreferencesAppSynchronize() {
python - <<END
from Foundation import CFPreferencesAppSynchronize
CFPreferencesAppSynchronize('$1')
END
}
PLIST=/usr/libexec/PlistBuddy
# ==============================================
# Terminal
# ==============================================
echo "Setting Terminal preferences"
FILE=~/Library/Preferences/com.apple.Terminal.plist
# Set terminal window size
$PLIST -c "Delete ':Window Settings:Pro:rowCount'" $FILE &>/dev/null
$PLIST -c "Add ':Window Settings:Pro:rowCount' integer 40" $FILE
$PLIST -c "Delete ':Window Settings:Pro:columnCount'" $FILE &>/dev/null
$PLIST -c "Add ':Window Settings:Pro:columnCount' integer 160" $FILE
# Set "Pro" as the default
defaults write com.apple.Terminal "Startup Window Settings" -string "Pro"
defaults write com.apple.Terminal "Default Window Settings" -string "Pro"
CFPreferencesAppSynchronize "com.apple.Terminal"