6d5e4eaebcde1c48413f89b4554983f489e4b017

Author
steeef <steeef@gmail.com>
Committer
steeef <steeef@gmail.com>
Date

Message

use 256 colors, if available

Diff

 1diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme
 2index 8c4c80265211b9de4bd88da4b9ac8de6099b5c31..d8f9306cdd5bb27364c86b4b95107e4a3e8541aa 100644
 3--- a/themes/steeef.zsh-theme
 4+++ b/themes/steeef.zsh-theme
 5@@ -19,6 +19,20 @@ colors
 6 autoload -U add-zsh-hook
 7 autoload -Uz vcs_info
 8 
 9+#use extended color pallete if available
10+if [ $TERM = "xterm-256color" ]; then
11+    turquoise="%F{81}"
12+    orange="%F{166}"
13+    purple="%F{135}"
14+    hotpink="%F{161}"
15+    limegreen="%F{118}"
16+else
17+    turquoise="$fg[cyan]"
18+    orange="$fg[yellow]"
19+    purple="$fg[magenta]"
20+    hotpink="$fg[red]"
21+    limegreen="$fg[green]"
22+fi
23 
24 # enable VCS systems you use
25 zstyle ':vcs_info:*' enable git svn
26@@ -35,10 +49,10 @@ zstyle ':vcs_info:*:prompt:*' check-for-changes true
27 # %R - repository path
28 # %S - path in the repository
29 PR_RST="%{${reset_color}%}"
30-FMT_BRANCH="(%{$fg[magenta]%}%b%u%c${PR_RST})"
31-FMT_ACTION="(%{$fg[green]%}%a${PR_RST})"
32-FMT_UNSTAGED="%{$fg[yellow]%}●"
33-FMT_STAGED="%{$fg[green]%}●"
34+FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})"
35+FMT_ACTION="(%{$limegreen%}%a${PR_RST})"
36+FMT_UNSTAGED="%{$orange%}●"
37+FMT_STAGED="%{$limegreen%}●"
38 
39 zstyle ':vcs_info:*:prompt:*' unstagedstr   "${FMT_UNSTAGED}"
40 zstyle ':vcs_info:*:prompt:*' stagedstr     "${FMT_STAGED}"
41@@ -68,9 +82,9 @@ function steeef_precmd {
42     # check for untracked files or updated submodules, since vcs_info doesn't
43     if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
44         PR_GIT_UPDATE=1
45-        FMT_BRANCH="(%{$fg[magenta]%}%b%u%c%{$fg[red]%}●${PR_RST})"
46+        FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})"
47     else
48-        FMT_BRANCH="(%{$fg[magenta]%}%b%u%c${PR_RST})"
49+        FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})"
50     fi
51     zstyle ':vcs_info:*:prompt:*' formats       "${FMT_BRANCH}"
52 
53@@ -82,5 +96,5 @@ function steeef_precmd {
54 add-zsh-hook precmd steeef_precmd
55 
56 PROMPT=$'
57-%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%~%{$reset_color%} $vcs_info_msg_0_
58+%{$purple%}%n%{$reset_color%} at %{$orange%}%m%{$reset_color%} in %{$limegreen%}%~%{$reset_color%} $vcs_info_msg_0_
59 $(virtualenv_info)$ '