Merge branch 'master' into next

pull/22/head
Ben Hilburn 7 years ago
commit 2a7f3966c2

@ -154,7 +154,7 @@ case $POWERLEVEL9K_MODE in
SWIFT_ICON '' SWIFT_ICON ''
GO_ICON '' GO_ICON ''
PUBLIC_IP_ICON '' PUBLIC_IP_ICON ''
LOCK_ICON $'\UE138' #  LOCK_ICON $'\UF023' # 
EXECUTION_TIME_ICON $'\uF253' EXECUTION_TIME_ICON $'\uF253'
SSH_ICON '(ssh)' SSH_ICON '(ssh)'
VPN_ICON $'\uF023' VPN_ICON $'\uF023'

@ -570,7 +570,7 @@ prompt_context() {
local content="" local content=""
if [[ "$POWERLEVEL9K_ALWAYS_SHOW_CONTEXT" == true ]] || [[ "$USER" != "$DEFAULT_USER" ]] || [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then if [[ "$POWERLEVEL9K_ALWAYS_SHOW_CONTEXT" == true ]] || [[ "$(whoami)" != "$DEFAULT_USER" ]] || [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then
if [[ $(print -P "%#") == '#' ]]; then if [[ $(print -P "%#") == '#' ]]; then
current_state="ROOT" current_state="ROOT"
@ -579,7 +579,7 @@ prompt_context() {
content="${POWERLEVEL9K_CONTEXT_TEMPLATE}" content="${POWERLEVEL9K_CONTEXT_TEMPLATE}"
elif [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]]; then elif [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]]; then
content="$USER" content="$(whoami)"
else else
return return
fi fi
@ -594,7 +594,7 @@ set_default POWERLEVEL9K_USER_TEMPLATE "%n"
prompt_user() { prompt_user() {
local current_state="DEFAULT" local current_state="DEFAULT"
typeset -AH user_state typeset -AH user_state
if [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]] || [[ "$USER" != "$DEFAULT_USER" ]]; then if [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]] || [[ "$(whoami)" != "$DEFAULT_USER" ]]; then
if [[ $(print -P "%#") == '#' ]]; then if [[ $(print -P "%#") == '#' ]]; then
user_state=( user_state=(
"STATE" "ROOT" "STATE" "ROOT"
@ -606,7 +606,7 @@ prompt_user() {
else else
user_state=( user_state=(
"STATE" "DEFAULT" "STATE" "DEFAULT"
"CONTENT" "$USER" "CONTENT" "$(whoami)"
"BACKGROUND_COLOR" "${DEFAULT_COLOR}" "BACKGROUND_COLOR" "${DEFAULT_COLOR}"
"FOREGROUND_COLOR" "011" "FOREGROUND_COLOR" "011"
"VISUAL_IDENTIFIER" "USER_ICON" "VISUAL_IDENTIFIER" "USER_ICON"

Loading…
Cancel
Save