merge: work
This commit is contained in:
commit
068145589b
9 changed files with 65 additions and 42 deletions
|
@ -2,7 +2,7 @@
|
|||
alias cls='clear && ls -lah'
|
||||
alias startgui='sway 2> $HOME/sway.log'
|
||||
alias tmp='cd $(mktemp -d)'
|
||||
alias update="paru -Syu; sudo npm update -g; pip freeze | cut -f1 -d= | xargs pip install -U; config submodule update --remote --recursive --init"
|
||||
alias update="paru -Syu; pip freeze | cut -f1 -d= | xargs pip install -U; config submodule update --remote --recursive --init"
|
||||
alias vi='$EDITOR'
|
||||
|
||||
# conf
|
||||
|
|
|
@ -1,12 +1,36 @@
|
|||
PROMPT='$(kube_ps1)
|
||||
%(?::%{$fg_bold[red]%}%? )%{$fg_bold[cyan]%}%~%{$reset_color%} $(git_prompt_info)'
|
||||
KUBE_PS1_KUBECONFIG="${KUBECONFIG:-$HOME/.kube/config}"
|
||||
KUBE_PS1_KUBECONFIGMD5=
|
||||
KUBE_PS1_CTX=
|
||||
KUBE_PS1_NS=
|
||||
|
||||
_update_KUBE_PS1() {
|
||||
local md5="$(md5sum $KUBE_PS1_KUBECONFIG)"
|
||||
|
||||
[[ "$md5" == "$KUBE_PS1_KUBECONFIGMD5" ]] && return
|
||||
|
||||
KUBE_PS1_KUBECONFIGMD5="$md5"
|
||||
KUBE_PS1_CTX="$(kubectl config current-context)"
|
||||
KUBE_PS1_NS="$(kubectl config view --minify -o jsonpath='{..namespace}')"
|
||||
}
|
||||
|
||||
precmd() {
|
||||
_update_KUBE_PS1
|
||||
local ctx="$KUBE_PS1_CTX"
|
||||
local ns="$KUBE_PS1_NS"
|
||||
local symbol='\u2388 '
|
||||
local sep='/'
|
||||
local bg='\e[44m'
|
||||
local reset='\e[0m'
|
||||
#local end=" $reset\e[34m\ue0b4" #
|
||||
#local end=" $reset\e[34m\ue0bc" #
|
||||
local end=" $reset\e[34m\ue0b0" #
|
||||
|
||||
echo "$bg$symbol$ctx$sep$ns$end$reset"
|
||||
}
|
||||
|
||||
PROMPT='%(?::%{$fg_bold[red]%}%? )%{$fg_bold[cyan]%}%~%{$reset_color%} $(git_prompt_info)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
||||
|
||||
KUBE_PS1_PREFIX=
|
||||
KUBE_PS1_SEPARATOR=' '
|
||||
KUBE_PS1_DIVIDER=/
|
||||
KUBE_PS1_SUFFIX=
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 82c0db41bcfd3fd97d6170dcb7575f98e38fc68d
|
||||
Subproject commit 29cf199b5d84eb4897f2e0e421a344174568eb9f
|
Loading…
Add table
Add a link
Reference in a new issue