|
|
@ -505,19 +505,19 @@ function install_font() {
|
|
|
|
clear
|
|
|
|
clear
|
|
|
|
case $terminal in
|
|
|
|
case $terminal in
|
|
|
|
Termux)
|
|
|
|
Termux)
|
|
|
|
mkdir -p ~/.termux || quit -c
|
|
|
|
command mkdir -p -- ~/.termux || quit -c
|
|
|
|
run_command "Downloading %BMesloLGS NF Regular.ttf%b" \
|
|
|
|
run_command "Downloading %BMesloLGS NF Regular.ttf%b" \
|
|
|
|
curl -fsSL -o ~/.termux/font.ttf "$font_base_url/MesloLGS%20NF%20Regular.ttf"
|
|
|
|
curl -fsSL -o ~/.termux/font.ttf "$font_base_url/MesloLGS%20NF%20Regular.ttf"
|
|
|
|
run_command "Reloading %BTermux%b settings" termux-reload-settings
|
|
|
|
run_command "Reloading %BTermux%b settings" termux-reload-settings
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
iTerm2)
|
|
|
|
iTerm2)
|
|
|
|
mkdir -p ~/Library/Fonts || quit -c
|
|
|
|
command mkdir -p -- ~/Library/Fonts || quit -c
|
|
|
|
local style
|
|
|
|
local style
|
|
|
|
for style in Regular Bold Italic 'Bold Italic'; do
|
|
|
|
for style in Regular Bold Italic 'Bold Italic'; do
|
|
|
|
local file="MesloLGS NF ${style}.ttf"
|
|
|
|
local file="MesloLGS NF ${style}.ttf"
|
|
|
|
run_command "Downloading %B$file%b" \
|
|
|
|
run_command "Downloading %B$file%b" \
|
|
|
|
curl -fsSL -o ~/Library/Fonts/$file.tmp "$font_base_url/${file// /%20}"
|
|
|
|
curl -fsSL -o ~/Library/Fonts/$file.tmp "$font_base_url/${file// /%20}"
|
|
|
|
zf_mv -f -- ~/Library/Fonts/$file{.tmp,} || quit -c
|
|
|
|
command mv -f -- ~/Library/Fonts/$file{.tmp,} || quit -c
|
|
|
|
done
|
|
|
|
done
|
|
|
|
print -nP -- "Changing %BiTerm2%b settings ..."
|
|
|
|
print -nP -- "Changing %BiTerm2%b settings ..."
|
|
|
|
local size=$iterm2_font_size
|
|
|
|
local size=$iterm2_font_size
|
|
|
@ -1590,7 +1590,11 @@ function ask_zshrc_edit() {
|
|
|
|
add_widget 0 print -P ""
|
|
|
|
add_widget 0 print -P ""
|
|
|
|
add_widget 1
|
|
|
|
add_widget 1
|
|
|
|
local modifiable=y
|
|
|
|
local modifiable=y
|
|
|
|
if [[ -e $__p9k_zshrc && ! -w $__p9k_zshrc ]]; then
|
|
|
|
if [[ ! -w $__p9k_zd ]]; then
|
|
|
|
|
|
|
|
modifiable=
|
|
|
|
|
|
|
|
add_widget 0 flowing -c %3FWARNING:%f %2F${__p9k_zd_u//\\/\\\\}%f %3Fis readonly.%f
|
|
|
|
|
|
|
|
add_widget 0 print -P ""
|
|
|
|
|
|
|
|
elif [[ -e $__p9k_zshrc && ! -w $__p9k_zshrc ]]; then
|
|
|
|
local -a stat
|
|
|
|
local -a stat
|
|
|
|
zstat -A stat +uid -- $__p9k_zshrc || quit -c
|
|
|
|
zstat -A stat +uid -- $__p9k_zshrc || quit -c
|
|
|
|
if (( stat[1] == EUID )); then
|
|
|
|
if (( stat[1] == EUID )); then
|
|
|
@ -1875,6 +1879,8 @@ function generate_config() {
|
|
|
|
header+=$line
|
|
|
|
header+=$line
|
|
|
|
header+=$'.\n# Type `p10k configure` to generate another config.\n#'
|
|
|
|
header+=$'.\n# Type `p10k configure` to generate another config.\n#'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
command mkdir -p -- ${__p9k_cfg_path:h} || return
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -e $__p9k_cfg_path ]]; then
|
|
|
|
if [[ -e $__p9k_cfg_path ]]; then
|
|
|
|
unlink $__p9k_cfg_path || return
|
|
|
|
unlink $__p9k_cfg_path || return
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -1914,7 +1920,7 @@ fi" || return
|
|
|
|
[[ ! -f ${(%)__p9k_cfg_path_u} ]] || source ${(%)__p9k_cfg_path_u}" || return
|
|
|
|
[[ ! -f ${(%)__p9k_cfg_path_u} ]] || source ${(%)__p9k_cfg_path_u}" || return
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
(( writable )) || chmod u-w -- $tmp || return
|
|
|
|
(( writable )) || chmod u-w -- $tmp || return
|
|
|
|
zf_mv -f -- $tmp $__p9k_zshrc || return
|
|
|
|
command mv -f -- $tmp $__p9k_zshrc || return
|
|
|
|
} always {
|
|
|
|
} always {
|
|
|
|
zf_rm -f -- $tmp
|
|
|
|
zf_rm -f -- $tmp
|
|
|
|
}
|
|
|
|
}
|
|
|
|