diff --git a/agnoster.zsh-theme b/agnoster.zsh-theme index d156340f..183a18bc 100644 --- a/agnoster.zsh-theme +++ b/agnoster.zsh-theme @@ -83,9 +83,22 @@ prompt_end() { # Context: user@hostname (who am I and where am I) prompt_context() { local user=`whoami` + local foreground background + + if [[ -n $HOST_FG ]]; then + foreground=$HOST_FG + else + foreground=default + fi + + if [[ -n $HOST_BG ]]; then + background=$HOST_BG + else + background=$PRIMARY_FG + fi if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CONNECTION" ]]; then - prompt_segment $PRIMARY_FG default " %(!.%{%F{yellow}%}.)$user@%m " + prompt_segment $background $foreground " %(!.%{%F{yellow}%}.)$user@%m " fi }