Skip to content

Commit

Permalink
Theme: Add hostname when remoted in
Browse files Browse the repository at this point in the history
  • Loading branch information
rehashedsalt committed Feb 12, 2018
1 parent c5ef20e commit dc709fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions themes/salt.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -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)'

0 comments on commit dc709fd

Please sign in to comment.