From c11c3a55de2be5a9e11b55426d0afbca43aace4d Mon Sep 17 00:00:00 2001 From: Jason Hutchinson Date: Fri, 26 May 2017 13:27:17 -0500 Subject: [PATCH] use p9k print_icon for kubecontext segment --- functions/icons.zsh | 4 ++++ powerlevel9k.zsh-theme | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/functions/icons.zsh b/functions/icons.zsh index 238b6b9e..e38d66a2 100644 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -84,6 +84,7 @@ case $POWERLEVEL9K_MODE in LOCK_ICON $'\UE138' #  EXECUTION_TIME_ICON $'\UE89C' #  SSH_ICON '(ssh)' + KUBERNETES_ICON $'\U2388' # ⎈ ) ;; 'awesome-fontconfig') @@ -152,6 +153,7 @@ case $POWERLEVEL9K_MODE in LOCK_ICON $'\UE138' #  EXECUTION_TIME_ICON $'\uF253' SSH_ICON '(ssh)' + KUBERNETES_ICON $'\U2388' # ⎈ ) ;; 'nerdfont-complete'|'nerdfont-fontconfig') @@ -220,6 +222,7 @@ case $POWERLEVEL9K_MODE in LOCK_ICON $'\UF023' #  EXECUTION_TIME_ICON $'\uF252' #  SSH_ICON $'\uF489' #  + KUBERNETES_ICON $'\U2388' # ⎈ ) ;; *) @@ -288,6 +291,7 @@ case $POWERLEVEL9K_MODE in LOCK_ICON $'\UE0A2' EXECUTION_TIME_ICON 'Dur' SSH_ICON '(ssh)' + KUBERNETES_ICON $'\U2388' # ⎈ ) ;; esac diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index fa2e94ab..0d794a85 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1362,7 +1362,7 @@ prompt_kubecontext() { local k8s_namespace=$(kubectl config get-contexts --no-headers | grep '*' | awk '{print $5}') # Get the current Kuberenetes context local k8s_context=$(kubectl config current-context) - "$1_prompt_segment" "$0" "$2" "magenta" "white" "$k8s_context/$k8s_namespace \u2388" + "$1_prompt_segment" "$0" "$2" "magenta" "white" "$k8s_context/$k8s_namespace" "KUBERNETES_ICON" fi }