summaryrefslogtreecommitdiff
path: root/internal/wizard.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-11-21 01:17:25 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-11-21 01:17:25 +0300
commitd4a0255b30f53be7fa8966b22427331ce7778e0f (patch)
tree835afc38a534043b371918e6bc46a5c32492b7ce /internal/wizard.zsh
parentdf74c32cdcf567564acac08a3377c1000288bec2 (diff)
iterm2: add settings that don't exist
Diffstat (limited to 'internal/wizard.zsh')
-rwxr-xr-xinternal/wizard.zsh32
1 files changed, 17 insertions, 15 deletions
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index 20ce77fa..b367057e 100755
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -332,23 +332,25 @@ function install_font() {
curl -fsSL -o ~/Library/Fonts/$file "$font_base_url/${file// /%20}"
done
print -nP -- "Changing %BiTerm2%b settings ..."
- local k v settings=(
- '"Normal Font"' '"MesloLGSNer-Regular '$iterm2_font_size'"'
- '"Horizontal Spacing"' 1
- '"Vertical Spacing"' 1
- '"Use Bold Font"' 1
- '"Use Bright Bold"' 1
- '"Use Italic Font"' 1
- '"Use Non-ASCII Font"' 0
- '"Ambiguous Double Width"' 0
- '"Terminal Type"' '"xterm-256color"'
- # '"Minimum Contrast"' 0.000000
- '"ASCII Anti Aliased"' 1
- '"Non-ASCII Anti Aliased"' 1
+ local k t v settings=(
+ '"Normal Font"' string '"MesloLGSNer-Regular '$iterm2_font_size'"'
+ '"Terminal Type"' string '"xterm-256color"'
+ '"Horizontal Spacing"' real 1
+ '"Vertical Spacing"' real 1
+ '"Minimum Contrast"' real 0
+ '"Use Bold Font"' bool 1
+ '"Use Bright Bold"' bool 1
+ '"Use Italic Font"' bool 1
+ '"ASCII Anti Aliased"' bool 1
+ '"Non-ASCII Anti Aliased"' bool 1
+ '"Use Non-ASCII Font"' bool 0
+ '"Ambiguous Double Width"' bool 0
)
- for k v in $settings; do
+ for k t v in $settings; do
+ /usr/libexec/PlistBuddy -c "Set :\"New Bookmarks\":0:$k $v" \
+ ~/Library/Preferences/com.googlecode.iterm2.plist && continue
run_command "" /usr/libexec/PlistBuddy -c \
- "Set :\"New Bookmarks\":0:$k $v" ~/Library/Preferences/com.googlecode.iterm2.plist
+ "Add :\"New Bookmarks\":0:$k $t $v" ~/Library/Preferences/com.googlecode.iterm2.plist
done
print -P " %2FOK%f"
run_command "Updating %BiTerm2%b settings cache" /usr/bin/defaults read com.googlecode.iterm2