aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r--powerlevel9k.zsh-theme13
1 files changed, 9 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index a9105482..ac7d98fa 100644
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -76,7 +76,7 @@ case $POWERLEVEL9K_MODE in
VCS_BOOKMARK_ICON="\uE87B" # 
VCS_COMMIT_ICON="\uE821 " # 
VCS_BRANCH_ICON="\uE220" # 
- VCS_REMOTE_BRANCH_ICON="\uE804" # 
+ VCS_REMOTE_BRANCH_ICON=" \uE804 " # 
VCS_GIT_ICON="\uE20E " # 
VCS_HG_ICON="\uE1C3 " # 
;;
@@ -132,7 +132,7 @@ case $POWERLEVEL9K_MODE in
VCS_BOOKMARK_ICON="\uE87B" # 
VCS_COMMIT_ICON="\uE821 " # 
VCS_BRANCH_ICON="\uE220" # 
- VCS_REMOTE_BRANCH_ICON="\uE804" # 
+ VCS_REMOTE_BRANCH_ICON=" \uE804 " # 
VCS_GIT_ICON="\uE20E " # 
VCS_HG_ICON="\uE1C3 " # 
;;
@@ -437,7 +437,12 @@ prompt_aws() {
# Note that if $DEFAULT_USER is not set, this prompt segment will always print
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
- $1_prompt_segment "$0" "$DEFAULT_COLOR" "011" "%(!.%{%F{yellow}%}.)$USER@%m"
+ if [[ $(print -P "%#") == '#' ]]; then
+ # Shell runs as root
+ $1_prompt_segment "$0_ROOT" "$DEFAULT_COLOR" "yellow" "$USER@%m"
+ else
+ $1_prompt_segment "$0_DEFAULT" "$DEFAULT_COLOR" "011" "$USER@%m"
+ fi
fi
}
@@ -482,7 +487,7 @@ prompt_longstatus() {
prompt_node_version() {
local nvm_prompt=$(node -v 2>/dev/null)
[[ -z "${nvm_prompt}" ]] && return
- NODE_ICON=$'\u2B22 ' # ⬢
+ NODE_ICON=$'\u2B22' # ⬢
$1_prompt_segment "$0" "green" "white" "${nvm_prompt:1} $NODE_ICON"
}