Change prompt tp Powerlevel10k for absurd performance

This commit is contained in:
Danielle McLean 2023-11-19 15:40:39 +11:00
parent 588a2006aa
commit 3b4c9be359
Signed by: 00dani
GPG key ID: 52C059C3B22A753E
3 changed files with 1725 additions and 8 deletions

1712
dot-config/zsh/p10k.zsh Normal file

File diff suppressed because it is too large Load diff

View file

@ -13,14 +13,8 @@ zinit $load willghatch/zsh-saneopt
zinit $load mafredri/zsh-async zinit $load mafredri/zsh-async
zinit $load rupa/z zinit $load rupa/z
if (( $+commands[starship] )); then zinit ice depth'1'
source <(starship init zsh --print-full-init) zinit $load romkatv/powerlevel10k
autoload starship_pure_title_precmd starship_pure_title_preexec
precmd_functions+=(starship_pure_title_precmd)
preexec_functions+=(starship_pure_title_preexec)
else
zinit $load sindresorhus/pure
fi
if (( $+commands[vivid] )); then if (( $+commands[vivid] )); then
export LS_COLORS=$(vivid generate molokai) export LS_COLORS=$(vivid generate molokai)

View file

@ -1,3 +1,10 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Optimised compinit taking advantage of zinit's completion handling, as well # Optimised compinit taking advantage of zinit's completion handling, as well
# as compiling the resulting zcompdump file. Have zinit call this once # as compiling the resulting zcompdump file. Have zinit call this once
# everything is loaded using an atload ice. # everything is loaded using an atload ice.
@ -14,6 +21,10 @@ for f in $ZDOTDIR/interactive/^*.zwc(N); source $f
[[ -o login ]] && for f in $ZDOTDIR/interactive+login/^*.zwc(N); source $f [[ -o login ]] && for f in $ZDOTDIR/interactive+login/^*.zwc(N); source $f
export POWERLEVEL9K_CONFIG_FILE=${ZDOTDIR}/p10k.zsh
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/p10k.zsh
[[ ! -f $POWERLEVEL9K_CONFIG_FILE ]] || source $POWERLEVEL9K_CONFIG_FILE
# If zsh init ends with a failing command (like a conditional) the prompt will # If zsh init ends with a failing command (like a conditional) the prompt will
# show the "error" colour on first launch. To avoid this, we simply end with a # show the "error" colour on first launch. To avoid this, we simply end with a
# true command: # true command: