summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel g. siegel2015-11-04 13:02:00 +0100
committerdaniel g. siegel2015-11-04 13:02:00 +0100
commitfc8c9a9fca82acb19ffe27a0fc82cd4f91cb073d (patch)
tree9a8ff92b06e5a55fba681995979e312006f83274
parentd00c8886060d3356c859f341f5358c48ae009a84 (diff)
downloadzsh-prompt-agnoster-fc8c9a9fca82acb19ffe27a0fc82cd4f91cb073d.tar.gz
zsh-prompt-agnoster-fc8c9a9fca82acb19ffe27a0fc82cd4f91cb073d.tar.bz2
zsh-prompt-agnoster-fc8c9a9fca82acb19ffe27a0fc82cd4f91cb073d.zip
use a different bg color when logged in remotely
-rw-r--r--agnoster.zsh-theme7
1 files changed, 5 insertions, 2 deletions
diff --git a/agnoster.zsh-theme b/agnoster.zsh-theme
index a591138..5ebd689 100644
--- a/agnoster.zsh-theme
+++ b/agnoster.zsh-theme
@@ -7,6 +7,9 @@
CURRENT_BG='NONE'
SEGMENT_SEPARATOR=''
+SSH_BG=green
+PRIMARY_FG=black
+
# Begin a segment
# Takes two arguments, background and foreground. Both can be omitted,
@@ -42,8 +45,8 @@ prompt_end() {
prompt_context() {
local user=`whoami`
- if [[ "$user" != "$USER" || -n "$SSH_CLIENT" ]]; then
- prompt_segment black default "%(!.%{%F{yellow}%}.)$user@%m"
+ if [[ "$user" != "$USER" || -n "$SSH_CONNECTION" ]]; then
+ prompt_segment $SSH_BG $PRIMARY_FG "%(!.%{%F{yellow}%}.)$user@%m"
fi
}