914e1b52583e09298f10fab7a301711bd9613ac6
- Author
- Sébastien M-B <essembeh@gmail.com>
- Committer
- Sébastien M-B <essembeh@gmail.com>
- Date
Message
Adding custom theme
Diff
1diff --git a/themes/essembeh.zsh-theme b/themes/essembeh.zsh-theme
2new file mode 100644
3index 0000000000000000000000000000000000000000..f9cd6c2416cbb4c8c27212e62e696768dee275d5
4--- /dev/null
5+++ b/themes/essembeh.zsh-theme
6@@ -0,0 +1,29 @@
7+# Theme with full path names and hostname
8+# Handy if you work on different servers all the time;
9+
10+
11+local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})"
12+
13+function my_git_prompt_info() {
14+ ref=$(git symbolic-ref HEAD 2> /dev/null) || return
15+ GIT_STATUS=$(git_prompt_status)
16+ [[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS"
17+ echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX"
18+}
19+
20+LOGIN_COLOR=green
21+test -n "$SSH_CONNECTION" && LOGIN_COLOR=red
22+test $UID -eq 0 && LOGIN_COLOR=pink
23+
24+PROMPT='%{$fg[$LOGIN_COLOR]%}%B%n@%M:%{$fg[yellow]%}%B%~%{$reset_color%}%b $(my_git_prompt_info)%(!.#.$) '
25+RPS1="${return_code}"
26+
27+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
28+ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
29+ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
30+ZSH_THEME_GIT_PROMPT_ADDED="+"
31+ZSH_THEME_GIT_PROMPT_MODIFIED="*"
32+ZSH_THEME_GIT_PROMPT_RENAMED="~"
33+ZSH_THEME_GIT_PROMPT_DELETED="!"
34+ZSH_THEME_GIT_PROMPT_UNMERGED="?"
35+