1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-26 17:01:56 +00:00

iterm2: add settings that don't exist

This commit is contained in:
romkatv 2019-11-20 23:17:25 +01:00
parent df74c32cdc
commit d4a0255b30

View file

@ -332,23 +332,25 @@ function install_font() {
curl -fsSL -o ~/Library/Fonts/$file "$font_base_url/${file// /%20}" curl -fsSL -o ~/Library/Fonts/$file "$font_base_url/${file// /%20}"
done done
print -nP -- "Changing %BiTerm2%b settings ..." print -nP -- "Changing %BiTerm2%b settings ..."
local k v settings=( local k t v settings=(
'"Normal Font"' '"MesloLGSNer-Regular '$iterm2_font_size'"' '"Normal Font"' string '"MesloLGSNer-Regular '$iterm2_font_size'"'
'"Horizontal Spacing"' 1 '"Terminal Type"' string '"xterm-256color"'
'"Vertical Spacing"' 1 '"Horizontal Spacing"' real 1
'"Use Bold Font"' 1 '"Vertical Spacing"' real 1
'"Use Bright Bold"' 1 '"Minimum Contrast"' real 0
'"Use Italic Font"' 1 '"Use Bold Font"' bool 1
'"Use Non-ASCII Font"' 0 '"Use Bright Bold"' bool 1
'"Ambiguous Double Width"' 0 '"Use Italic Font"' bool 1
'"Terminal Type"' '"xterm-256color"' '"ASCII Anti Aliased"' bool 1
# '"Minimum Contrast"' 0.000000 '"Non-ASCII Anti Aliased"' bool 1
'"ASCII Anti Aliased"' 1 '"Use Non-ASCII Font"' bool 0
'"Non-ASCII Anti Aliased"' 1 '"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 \ 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 done
print -P " %2FOK%f" print -P " %2FOK%f"
run_command "Updating %BiTerm2%b settings cache" /usr/bin/defaults read com.googlecode.iterm2 run_command "Updating %BiTerm2%b settings cache" /usr/bin/defaults read com.googlecode.iterm2