# color me, color you


In [the xoria256m post](/2011/september/11/xoria256m_color_scheme/index.html), 
I introduced my xoria256 like color scheme. Again, inspired by 
[solarized](http://ethanschoonover.com/solarized), I extended
this to other applications. So now I use this in the following apps:

* vim (see that previous post);
* mutt (idem);
* zsh;
* dircolors;
* git (a bit).

# zsh
See this file 
[to setup the colors](https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/spectrum.zsh). 
Then in my prompt I have stuff like:
    
    PS1=$'${vcs_info_msg_0_}$FG[067]%(1j.$myjobs% $FX[reset].$FX[reset])$FG[179]%#$FX[reset] '
    RPS1="$RPSL%$MAXMID<...<$mypath$RPSR$FG[239]$FX[bold]$__ZH$FX[reset]${vcs_info_msg_1_}"
    RPSR=$'$FX[reset]$FG[009]%(0?.$FG[reset]. $E)$FX[reset]'

For zsh I have two files that make up my prompt:

* [zprompt](/downloads/2011/zprompt), primary prompt setup;
* [zvcs](/downloads/2011/zvcs), version control `vcs_info` stuff.

Also see [this older blog post](/2008/february/20/my_zsh_prompt_setup/index.html) on this setup. 
This leads to a prompt looking like this (click for larger):

The normal prompt is very plain. Almost nothing is shown, left the
prompt `%` and on the right the PWD `~`:
<a href="/images/2011/prompt-local.png"><img width="600px"
src="images/2011/prompt-local.png" title="Zsh " /></a>

When logging in to a remote server, the hostname appears on the
right:
<a href="images/2011/prompt-remote.png"><img width="600px"
src="images/2011/prompt-remote.png" title="Zsh " /></a>

When a program ends abnormally the exitcode is shown, in words (`-INT`)
and red when it isn't zero:
<a href="images/2011/prompt-exitcode.png"><img width="600px"
src="images/2011/prompt-exitcode.png" title="Zsh " /></a>

When you background an app. the number of bg jobs appear in blue. The
one with the `+` is the current job. Multiple jobs are separated with commas:
<a href="images/2011/prompt-background.png"><img width="600px"
src="images/2011/prompt-background.png" title="Zsh " /></a>

When you enter a git/svn/hg directory, the right side shows the type
(git, svn, hg) and on the left you get the current branch. 
<a href="images/2011/prompt-git.png"><img width="600px"
src="images/2011/prompt-git.png" title="Zsh " /></a>

# dircolors
Modified from Solarized, not quite finished, but certainly looks nice (IMHO).
See [this dircolors file](/downloads/2011/dircolors), I use
it like:

    eval $(dircolors ./dircolors)

# git
The `alias` section from my `.gitconfig`:

    [alias]
            st = status
            ci = commit
            br = branch
            co = checkout
            df = diff
            lg = log -p
            pl = pull
            ps = push
            timeline = log --graph \"--pretty=format:%C(192)%h%Creset by %C(bold 239)%an%Creset (%ar)%C(182)%d%Creset%n%s%n%b\" --all

The colors are selected with `%C(number)`.


