From cf806f097b42c798223d6dc68ff551b4fc90ea43 Mon Sep 17 00:00:00 2001 From: Christo Kotze Date: Tue, 23 May 2017 19:14:52 +0400 Subject: [PATCH 1/2] updated render check logic --- powerlevel9k.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 0ae046d5..d7ae04ff 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -574,7 +574,7 @@ set_default POWERLEVEL9K_USER_TEMPLATE "%n" prompt_user() { local current_state="DEFAULT" typeset -AH user_state - if [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]] || [[ "$USER" != "$DEFAULT_USER" ]] || [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then + if [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]] || [[ "$USER" != "$DEFAULT_USER" ]]; then if [[ $(print -P "%#") == '#' ]]; then user_state=( "STATE" "ROOT" @@ -592,8 +592,8 @@ prompt_user() { "VISUAL_IDENTIFIER" "USER_ICON" ) fi + "$1_prompt_segment" "${0}_${user_state[STATE]}" "$2" "${user_state[BACKGROUND_COLOR]}" "${user_state[FOREGROUND_COLOR]}" "${user_state[CONTENT]}" "${user_state[VISUAL_IDENTIFIER]}" fi - "$1_prompt_segment" "${0}_${user_state[STATE]}" "$2" "${user_state[BACKGROUND_COLOR]}" "${user_state[FOREGROUND_COLOR]}" "${user_state[CONTENT]}" "${user_state[VISUAL_IDENTIFIER]}" } ################################################################ From de6a9388e9f4467e1e68bff7e24051a7d5c2b4b0 Mon Sep 17 00:00:00 2001 From: Christo Kotze Date: Tue, 23 May 2017 19:16:46 +0400 Subject: [PATCH 2/2] updated to fix copy/paste --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f62511b1..db58c039 100644 --- a/README.md +++ b/README.md @@ -486,8 +486,8 @@ POWERLEVEL9K_ROOT_ICON="#" | Variable | Default Value | Description | |----------|---------------|-------------| -|`DEFAULT_USER`|None|Username to consider a "default context" (you can also set `$USER`).| -|`POWERLEVEL9K_ALWAYS_SHOW_USER`|false|Always show the username, but conditionalize the hostname.| +|`DEFAULT_USER`|None|Username to consider a "default context" (you can also set it to `$USER`).| +|`POWERLEVEL9K_ALWAYS_SHOW_USER`|false|Always show the username.| |`POWERLEVEL9K_USER_TEMPLATE`|%n|Default username prompt (username). Refer to the [ZSH Documentation](http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html) for all possible expansions| ##### vcs