mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 12:20:07 +00:00
wizard: if cannot display powerline glyphs, use flat heads by default and offer to change to blurred
This commit is contained in:
parent
0f406f088d
commit
91023a1d8a
1 changed files with 35 additions and 11 deletions
|
@ -1102,7 +1102,7 @@ function ask_separators() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function ask_heads() {
|
function ask_heads() {
|
||||||
if [[ $style != (classic|rainbow) || $cap_diamond != 1 ]]; then
|
if [[ $style != (classic|rainbow) ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
if [[ $POWERLEVEL9K_MODE == nerdfont-complete && $LINES -lt 26 ]]; then
|
if [[ $POWERLEVEL9K_MODE == nerdfont-complete && $LINES -lt 26 ]]; then
|
||||||
|
@ -1113,7 +1113,9 @@ function ask_heads() {
|
||||||
while true; do
|
while true; do
|
||||||
local extra=
|
local extra=
|
||||||
clear
|
clear
|
||||||
|
if
|
||||||
flowing -c "%BPrompt Heads%b"
|
flowing -c "%BPrompt Heads%b"
|
||||||
|
if (( cap_diamond )); then
|
||||||
if [[ -n $nl ]]; then
|
if [[ -n $nl ]]; then
|
||||||
print -P " head"
|
print -P " head"
|
||||||
print -P "%B(1) Sharp.%b |"
|
print -P "%B(1) Sharp.%b |"
|
||||||
|
@ -1122,6 +1124,12 @@ function ask_heads() {
|
||||||
print -P "%B(1) Sharp.%b"
|
print -P "%B(1) Sharp.%b"
|
||||||
fi
|
fi
|
||||||
left_head=$right_triangle right_head=$left_triangle print_prompt
|
left_head=$right_triangle right_head=$left_triangle print_prompt
|
||||||
|
else
|
||||||
|
print -P ""
|
||||||
|
print -P "%B(1) Flat.%b"
|
||||||
|
print -P ""
|
||||||
|
left_head= right_head= print_prompt
|
||||||
|
fi
|
||||||
print -P ""
|
print -P ""
|
||||||
print -P "%B(2) Blurred.%b"
|
print -P "%B(2) Blurred.%b"
|
||||||
print -n $nl
|
print -n $nl
|
||||||
|
@ -1148,8 +1156,24 @@ function ask_heads() {
|
||||||
case $key in
|
case $key in
|
||||||
q) quit;;
|
q) quit;;
|
||||||
r) return 1;;
|
r) return 1;;
|
||||||
1) left_head=$right_triangle; right_head=$left_triangle; options+='sharp heads'; break;;
|
1)
|
||||||
2) left_head=$fade_out; right_head=$fade_in; options+='blurred heads'; break;;
|
if (( cap_diamond )); then
|
||||||
|
left_head=$right_triangle
|
||||||
|
right_head=$left_triangle
|
||||||
|
options+='sharp heads'
|
||||||
|
else
|
||||||
|
left_head=
|
||||||
|
right_head=
|
||||||
|
options+='flat heads'
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
left_head=$fade_out
|
||||||
|
right_head=$fade_in
|
||||||
|
options+='blurred heads'
|
||||||
|
break
|
||||||
|
;;
|
||||||
3)
|
3)
|
||||||
if [[ $extra == *3* ]]; then
|
if [[ $extra == *3* ]]; then
|
||||||
left_head=$down_triangle
|
left_head=$down_triangle
|
||||||
|
@ -1971,8 +1995,8 @@ while true; do
|
||||||
right_sep=
|
right_sep=
|
||||||
left_subsep=$vertical_bar
|
left_subsep=$vertical_bar
|
||||||
right_subsep=$vertical_bar
|
right_subsep=$vertical_bar
|
||||||
left_head=$fade_out
|
left_head=
|
||||||
right_head=$fade_in
|
right_head=
|
||||||
fi
|
fi
|
||||||
_p9k_init_icons
|
_p9k_init_icons
|
||||||
ask_narrow_icons || continue
|
ask_narrow_icons || continue
|
||||||
|
|
Loading…
Reference in a new issue