diff options
Diffstat (limited to 'internal/wizard.zsh')
-rwxr-xr-x | internal/wizard.zsh | 96 |
1 files changed, 94 insertions, 2 deletions
diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 9ea8abcf..77b72b2f 100755 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -38,7 +38,8 @@ source $__p9k_root_dir/internal/configure.zsh || return typeset -r font_base_url='https://github.com/romkatv/dotfiles-public/raw/master/.local/share/fonts/NerdFonts' typeset -ri wizard_columns=$((COLUMNS < 80 ? COLUMNS : 80)) -typeset -ri prompt_indent=2 +typeset -i prompt_indent=2 +typeset -i rprompt_indent=2 typeset -ra bg_color=(240 238 236 234) typeset -ra frame_color=(244 242 240 238) @@ -131,7 +132,7 @@ function print_prompt() { (( left_frame )) || left=('' $left[2] '' '%76F❯%f █') (( right_frame )) || right=($right[1] '' '' '') fi - local -i right_indent=prompt_indent + local -i right_indent=rprompt_indent local -i width=$(prompt_length ${(g::):-$left[1]$left[2]$right[1]$right[2]}) while (( wizard_columns - width <= prompt_indent + right_indent )); do (( --right_indent )) @@ -1550,6 +1551,97 @@ while true; do fi _p9k_init_icons ask_narrow_icons || continue + + local dir_icon=${(g::)icons[HOME_SUB_ICON]} + local vcs_icon=${(g::)icons[VCS_GIT_GITHUB_ICON]} + local branch_icon=${(g::)icons[VCS_BRANCH_ICON]} + if (( cap_narrow_icons )); then + dir_icon=${dir_icon// } + vcs_icon=${vcs_icon// } + branch_icon=${branch_icon// } + fi + local many=("$dir_icon " "$vcs_icon $branch_icon ") + + # Set screen size to 70x20, run p9k_configure, answer 'yyny'. + reset + echo + centered "Lean Style" + ( + style=lean + num_lines=1 + prompt_indent=4 + rprompt_indent=4 + echo + print_prompt + ) + echo + ( + style=lean + extra_icons=($many) + prefixes=('on ' 'at ') + num_lines=2 + prompt_indent=4 + rprompt_indent=4 + echo + print_prompt + ) + echo + centered "Classic Style" + ( + style=classic + num_lines=1 + prompt_indent=4 + rprompt_indent=4 + echo + print_prompt + ) + echo + ( + style=classic + num_lines=2 + # slanted sep + left_sep=$down_triangle + right_sep=$up_triangle + left_subsep=$slanted_bar + right_subsep=$slanted_bar + # blurred heads + left_head=$fade_out; right_head=$fade_in; + # blurred tails + left_tail=$fade_in; right_tail=$fade_out; + gap_char="·" + prompt_indent=2 + rprompt_indent=2 + echo + print_prompt + ) + ( + style=classic + num_lines=2 + # slanted sep + left_sep=$down_triangle + right_sep=$up_triangle + left_subsep=$slanted_bar + right_subsep=$slanted_bar + # slanted heads + left_head=$down_triangle + right_head=$up_triangle + # slanted tails + left_tail=$up_triangle + right_tail=$down_triangle + # gap_char="·" + # gap_char="─" + left_frame=0; right_frame=1 + extra_icons=($many) + prompt_indent=4 + rprompt_indent=2 + echo + print_prompt + ) + tput civis + read + tput cnorm + return 1 + ask_style || continue if [[ $style != pure ]]; then ask_color || continue |