diff options
author | Alan Pearce | 2023-05-22 19:09:47 +0200 |
---|---|---|
committer | Alan Pearce | 2023-05-22 19:22:45 +0200 |
commit | 0b5545aec273e35baee25ee91949a0247e873801 (patch) | |
tree | 3c1da413fbab87ea2c209559ba59435f451b36df /user/zsh | |
parent | 4a4ab6d89a833895e26effa213fbc0e64b5e16ac (diff) | |
download | nixfiles-0b5545aec273e35baee25ee91949a0247e873801.tar.lz nixfiles-0b5545aec273e35baee25ee91949a0247e873801.tar.zst nixfiles-0b5545aec273e35baee25ee91949a0247e873801.zip |
zsh: replace agkozak prompt with powerlevel10k
Diffstat (limited to 'user/zsh')
-rw-r--r-- | user/zsh/zshrc | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/user/zsh/zshrc b/user/zsh/zshrc index 8b66be24..9e26b48c 100644 --- a/user/zsh/zshrc +++ b/user/zsh/zshrc @@ -135,39 +135,9 @@ then %# ' unsetopt zle else - AGKOZAK_USER_HOST_DISPLAY=${+SSH_CLIENT} - AGKOZAK_SHOW_STASH=0 - AGKOZAK_SHOW_VIRTUALENV=0 - AGKOZAK_PROMPT_DIRTRIM=0 - - check_kubectl_context () { - if [[ "$PWD" =~ satoshipay ]] - then - kubectl_context=$(kubectl config current-context) - kubectl_namespace=$(kubectl config view -o jsonpath="{.contexts[?(@.name==\"${kubectl_context}\")].context.namespace}") - if [[ $kubectl_context =~ production ]] - then - kubectl_colour=red - kubectl_release=satoshipay-${kubectl_namespace} - else - kubectl_colour=yellow - if [[ -z $mr ]] - then - kubectl_release=satoshipay-${kubectl_namespace}-staging - else - kubectl_release=story-${mr}-${kubectl_namespace} - fi - fi - prompt_context="%F{$kubectl_colour}[${kubectl_context}:${kubectl_namespace}]%f" - else - prompt_context= - fi - } - if [[ -z $SSH_CLIENT ]] + if [[ -f "$ZDOTDIR/.p10k.zsh" ]] then - precmd_functions+=(check_kubectl_context) - AGKOZAK_LEFT_PROMPT_ONLY=${+SSH_CLIENT} - AGKOZAK_CUSTOM_RPROMPT='${prompt_context}%(3V.%F{${AGKOZAK_COLORS_BRANCH_STATUS}%3v%f.)' + source $ZDOTDIR/.p10k.zsh fi fi |