Move username colour in prompt to appropriate place

This commit is contained in:
tastytea 2022-04-23 11:36:09 +02:00
parent 50f2939827
commit 065122564a
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -19,7 +19,7 @@ zsh_theme_colours[inactive]="236" # grey
# Show username if it is not the default user # Show username if it is not the default user
local showuser="" local showuser=""
if [[ "${USERNAME}" != "${DEFAULT_USER}" ]] && [[ -n "${USERNAME}" ]]; then if [[ "${USERNAME}" != "${DEFAULT_USER}" ]] && [[ -n "${USERNAME}" ]]; then
showuser="%n " showuser="%B%F{${zsh_theme_colours[prompt]}}%n%f%b "
fi fi
autoload -Uz vcs_info autoload -Uz vcs_info
@ -127,7 +127,7 @@ function _shrunkpwd()
setopt PROMPT_SUBST setopt PROMPT_SUBST
PROMPT="%B%F{${zsh_theme_colours[prompt]}}${showuser}%b"'${vcs_info_msg_0_}'"%B%F{${zsh_theme_colours[prompt]}}%#%f%b " PROMPT="${showuser}"'${vcs_info_msg_0_}'"%B%F{${zsh_theme_colours[prompt]}}%#%f%b "
RPROMPT="%F{${zsh_theme_colours[minor]}}%(?..[%B%F{${zsh_theme_colours[highlight]}}%?%b%F{${zsh_theme_colours[minor]}}] )"'$(_shrunkpwd)'"%f" RPROMPT="%F{${zsh_theme_colours[minor]}}%(?..[%B%F{${zsh_theme_colours[highlight]}}%?%b%F{${zsh_theme_colours[minor]}}] )"'$(_shrunkpwd)'"%f"
} }