From dc709fd7a8399274437d84c7f6da11d5f609835a Mon Sep 17 00:00:00 2001 From: Salt Date: Mon, 12 Feb 2018 13:34:33 -0600 Subject: [PATCH] Theme: Add hostname when remoted in --- themes/salt.zsh-theme | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/themes/salt.zsh-theme b/themes/salt.zsh-theme index 9c37866..cc0090b 100644 --- a/themes/salt.zsh-theme +++ b/themes/salt.zsh-theme @@ -2,12 +2,16 @@ # Designed with Solarized Light in mind # Change PWD color if we're remoted in via SSH -if [ $SSH_CLIENT ]; then pwd_color="red"; else pwd_color="blue"; fi +hostname_prefix="" +if [ $SSH_CLIENT ]; then + pwd_color="red" + hostname_prefix="%B$SHORT_HOST%b%{$fg[$pwd_color]%}:" +else pwd_color="blue"; fi ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}[%{$fg[yellow]%}%B" ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$reset_color%}]" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*" # Set our prompts up -PROMPT='[%{$fg[$pwd_color]%}%~%{$reset_color%}]%(?::%{$fg_bold[red]%}?%{$reset_color%})%(!.%{$fg_bold[red]%}#.%{$fg[green]%}$)%{$reset_color%} ' +PROMPT='[%{$fg[$pwd_color]%}$hostname_prefix%~%{$reset_color%}]%(?::%{$fg_bold[red]%}?%{$reset_color%})%(!.%{$fg_bold[red]%}#.%{$fg[green]%}$)%{$reset_color%} ' RPROMPT='$(git_prompt_info)'