8e6ce534a2cfa91d6398fecf42c4149fa1e5294f

Author
Sébastien M-B <essembeh@gmail.com>
Committer
Sébastien M-B <essembeh@gmail.com>
Date

Message

Update theme

Use different colors in case of root or ssh connection for prompt.

Diff

 1diff --git a/themes/essembeh.zsh-theme b/themes/essembeh.zsh-theme
 2index f9cd6c2416cbb4c8c27212e62e696768dee275d5..8c98ea1ed7324958c5b0c6079b0c2525019f79a5 100644
 3--- a/themes/essembeh.zsh-theme
 4+++ b/themes/essembeh.zsh-theme
 5@@ -11,14 +11,16 @@ function my_git_prompt_info() {
 6 	echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX"
 7 }
 8 
 9-LOGIN_COLOR=green
10-test -n "$SSH_CONNECTION" && LOGIN_COLOR=red
11-test $UID -eq 0 && LOGIN_COLOR=pink
12-
13-PROMPT='%{$fg[$LOGIN_COLOR]%}%B%n@%M:%{$fg[yellow]%}%B%~%{$reset_color%}%b $(my_git_prompt_info)%(!.#.$) '
14+# Colored prompt
15+ZSH_THEME_COLOR_USER="green" 
16+ZSH_THEME_COLOR_HOST="green" 
17+ZSH_THEME_COLOR_PWD="yellow" 
18+test -n "$SSH_CONNECTION" && ZSH_THEME_COLOR_USER="red" && ZSH_THEME_COLOR_HOST="red"
19+test `id -u` = 0 && ZSH_THEME_COLOR_USER="magenta" && ZSH_THEME_COLOR_HOST="magenta"
20+PROMPT='%{$fg_bold[$ZSH_THEME_COLOR_USER]%}%n@%{$fg_bold[$ZSH_THEME_COLOR_HOST]%}%M%{$reset_color%}:%{$fg_bold[$ZSH_THEME_COLOR_PWD]%}%~%{$reset_color%} $(my_git_prompt_info)%(!.#.$) '
21 RPS1="${return_code}"
22 
23-ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
24+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[cyan]%}("
25 ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
26 ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
27 ZSH_THEME_GIT_PROMPT_ADDED="+"