reduce wizard's minimum terminal size requirements

screenshot
romkatv 5 years ago
parent fa90d99636
commit dc8e654165

@ -1,5 +1,5 @@
typeset -gr __p9k_wizard_columns=80 typeset -gr __p9k_wizard_columns=76
typeset -gr __p9k_wizard_lines=27 typeset -gr __p9k_wizard_lines=21
typeset -gr __p9k_zd=${${ZDOTDIR:-$HOME}:A} typeset -gr __p9k_zd=${${ZDOTDIR:-$HOME}:A}
typeset -gr __p9k_zd_u=${${(q-)__p9k_zd}/#(#b)$HOME(|\/*)/'~'$match[1]} typeset -gr __p9k_zd_u=${${(q-)__p9k_zd}/#(#b)$HOME(|\/*)/'~'$match[1]}
typeset -gr __p9k_cfg_basename=.p10k.zsh typeset -gr __p9k_cfg_basename=.p10k.zsh

@ -204,7 +204,6 @@ function ask_lock() {
print -P "%B(n) No.%b" print -P "%B(n) No.%b"
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -232,7 +231,6 @@ function ask_python() {
print -P "%B(n) No.%b" print -P "%B(n) No.%b"
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -270,7 +268,6 @@ function ask_narrow_icons() {
print -P "%B(n) No. Some icons %b%2Foverlap%f%B neighbouring crosses.%b" print -P "%B(n) No. Some icons %b%2Foverlap%f%B neighbouring crosses.%b"
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -299,7 +296,6 @@ function ask_style() {
style=classic print_prompt style=classic print_prompt
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -333,7 +329,6 @@ function ask_color() {
color=3 print_prompt color=3 print_prompt
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -375,7 +370,6 @@ function ask_extra_icons() {
extra_icons=("$many[@]") print_prompt extra_icons=("$many[@]") print_prompt
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -405,7 +399,6 @@ function ask_prefixes() {
prefixes=("$fluent[@]") print_prompt prefixes=("$fluent[@]") print_prompt
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -445,7 +438,6 @@ function ask_separators() {
print -P "" print -P ""
fi fi
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -498,18 +490,17 @@ function ask_heads() {
left_head=$right_triangle right_head=$left_triangle print_prompt left_head=$right_triangle right_head=$left_triangle print_prompt
print -P "" print -P ""
print -P "%B(2) Blurred.%b" print -P "%B(2) Blurred.%b"
print -P ""
left_head=$fade_out right_head=$fade_in print_prompt left_head=$fade_out right_head=$fade_in print_prompt
print -P ""
if [[ $POWERLEVEL9K_MODE == nerdfont-complete ]]; then if [[ $POWERLEVEL9K_MODE == nerdfont-complete ]]; then
extra+=3 extra+=3
print -P ""
print -P "%B(3) Slanted.%b" print -P "%B(3) Slanted.%b"
print -P "" print -P ""
left_head=$down_triangle right_head=$up_triangle print_prompt left_head=$down_triangle right_head=$up_triangle print_prompt
print -P "" print -P ""
fi fi
print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -536,35 +527,40 @@ function ask_tails() {
if [[ $style != classic ]]; then if [[ $style != classic ]]; then
return return
fi fi
if [[ $POWERLEVEL9K_MODE == nerdfont-complete && $LINES -lt 26 ]]; then
local nl=''
else
local nl=$'\n'
fi
while true; do while true; do
local extra= local extra=
clear clear
centered "%BPrompt Tails%b" centered "%BPrompt Tails%b"
print -P "" print -n $nl
print -P "%B(1) Flat.%b" print -P "%B(1) Flat.%b"
print -P "" print -n $nl
left_tail='' right_tail='' print_prompt left_tail='' right_tail='' print_prompt
print -P "" print -P ""
print -P "%B(2) Blurred.%b" print -P "%B(2) Blurred.%b"
print -P "" print -n $nl
left_tail=$fade_in right_tail=$fade_out print_prompt left_tail=$fade_in right_tail=$fade_out print_prompt
print -P "" print -P ""
if (( cap_diamond )); then if (( cap_diamond )); then
extra+=3 extra+=3
print -P "%B(3) Sharp.%b" print -P "%B(3) Sharp.%b"
print -P "" print -n $nl
left_tail=$left_triangle right_tail=$right_triangle print_prompt left_tail=$left_triangle right_tail=$right_triangle print_prompt
print -P "" print -P ""
if [[ $POWERLEVEL9K_MODE == nerdfont-complete ]]; then if [[ $POWERLEVEL9K_MODE == nerdfont-complete ]]; then
extra+=4 extra+=4
print -P "%B(4) Slanted.%b" print -P "%B(4) Slanted.%b"
print -P "" print -n $nl
left_tail=$up_triangle right_tail=$down_triangle print_prompt left_tail=$up_triangle right_tail=$down_triangle print_prompt
print -P "" print -P ""
fi fi
fi fi
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -609,7 +605,6 @@ function ask_num_lines() {
num_lines=2 print_prompt num_lines=2 print_prompt
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -645,7 +640,6 @@ function ask_gap_char() {
gap_char="─" print_prompt gap_char="─" print_prompt
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -665,33 +659,34 @@ function ask_frame() {
if [[ $style != classic || $num_lines != 2 ]]; then if [[ $style != classic || $num_lines != 2 ]]; then
return return
fi fi
(( LINES >= 26 )) && local nl=$'\n' || local nl=''
while true; do while true; do
clear clear
centered "%BPrompt Frame%b" centered "%BPrompt Frame%b"
print -P "" print -n $nl
print -P "%B(1) No frame.%b" print -P "%B(1) No frame.%b"
print -P "" print -n $nl
left_frame=0 right_frame=0 print_prompt left_frame=0 right_frame=0 print_prompt
print -P "" print -P ""
print -P "%B(2) Left.%b" print -P "%B(2) Left.%b"
print -P "" print -n $nl
left_frame=1 right_frame=0 print_prompt left_frame=1 right_frame=0 print_prompt
print -P "" print -P ""
print -P "%B(3) Right.%b" print -P "%B(3) Right.%b"
print -P "" print -n $nl
left_frame=0 right_frame=1 print_prompt left_frame=0 right_frame=1 print_prompt
print -P "" print -P ""
print -P "%B(4) Full.%b" print -P "%B(4) Full.%b"
print -P "" print -n $nl
left_frame=1 right_frame=1 print_prompt left_frame=1 right_frame=1 print_prompt
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
local key= local key=
read -k key${(%):-"?%BChoice [123rq]: %b"} || quit read -k key${(%):-"?%BChoice [1234rq]: %b"} || quit
case $key in case $key in
q) quit;; q) quit;;
r) return 1;; r) return 1;;
@ -720,7 +715,6 @@ function ask_empty_line() {
print_prompt print_prompt
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -747,7 +741,6 @@ function ask_confirm() {
print -P "%B(y) Yes.%b" print -P "%B(y) Yes.%b"
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""
@ -775,7 +768,6 @@ function ask_config_overwrite() {
print -P "%B(y) Yes.%b" print -P "%B(y) Yes.%b"
print -P "" print -P ""
print -P "(r) Restart from the beginning." print -P "(r) Restart from the beginning."
print -P ""
print -P "(q) Quit and do nothing." print -P "(q) Quit and do nothing."
print -P "" print -P ""

Loading…
Cancel
Save