diff --git a/05-start.zsh b/05-start.zsh index a972243..908d42f 100644 --- a/05-start.zsh +++ b/05-start.zsh @@ -6,6 +6,10 @@ # Initialization code that may require console input # (password prompts, [y/n] confirmations, etc.) # must go above this block; everything else may go below. + +! is-at-least 5.8 && return +command -v starship >/dev/null && return + if [ -r "${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh" ]; then source "${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh" fi diff --git a/88-prompt.zsh b/88-prompt.zsh index 242a801..341be17 100644 --- a/88-prompt.zsh +++ b/88-prompt.zsh @@ -1,25 +1,26 @@ # shellcheck shell=bash # vim: ft=sh +if ! is-at-least 5.8; then + zinit light agkozak/agkozak-zsh-prompt + return +fi + if command -v starship >/dev/null; then eval "$(starship init zsh)" return fi -if is-at-least 5.3; then - zinit ice depth"1" # git clone depth - zinit light romkatv/powerlevel10k +zinit ice depth"1" # git clone depth +zinit light romkatv/powerlevel10k - # To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh. - if [[ -r "$ZDOTDIR/.p10k.user.zsh" ]]; then - source "$ZDOTDIR/.p10k.user.zsh" - else - if [[ "$TERM" = "xterm" ]]; then - [[ -r "$ZDOTDIR/.p10k.8colors.zsh" ]] && source "$ZDOTDIR/.p10k.8colors.zsh" - else - [[ -r "$ZDOTDIR/.p10k.zsh" ]] && source "$ZDOTDIR/.p10k.zsh" - fi - fi +# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh. +if [[ -r "$ZDOTDIR/.p10k.user.zsh" ]]; then + source "$ZDOTDIR/.p10k.user.zsh" else - zinit light agkozak/agkozak-zsh-prompt + if [[ "$TERM" = "xterm" ]]; then + [[ -r "$ZDOTDIR/.p10k.8colors.zsh" ]] && source "$ZDOTDIR/.p10k.8colors.zsh" + else + [[ -r "$ZDOTDIR/.p10k.zsh" ]] && source "$ZDOTDIR/.p10k.zsh" + fi fi