aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r--powerlevel9k.zsh-theme20
1 files changed, 14 insertions, 6 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index c2ad0303..dbfc60c8 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"
}
@@ -622,8 +627,11 @@ powerlevel9k_init() {
add-zsh-hook precmd vcs_info
if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then
- PROMPT="╭─%{%f%b%k%}"'$(build_left_prompt)'"
-╰─ "
+ [[ -n $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX ]] || POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="╭─"
+ [[ -n $POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX ]] || POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="╰─ "
+
+ PROMPT="$POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX%{%f%b%k%}"'$(build_left_prompt)'"
+$POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX"
# The right prompt should be on the same line as the first line of the left
# prompt. To do so, there is just a quite ugly workaround: Before zsh draws
# the RPROMPT, we advise it, to go one line up. At the end of RPROMPT, we