From 53838bb9d1ee203317492afbafe936553434a556 Mon Sep 17 00:00:00 2001 From: Carlos Cardoso Date: Sat, 26 Apr 2014 23:29:34 -0300 Subject: [PATCH] theme customization based on avit and sporty_256 --- lib/aliases.zsh | 7 ------- templates/zshrc-linux.zsh | 3 ++- templates/zshrc-mac.zsh | 2 +- themes/cadusk.zsh-theme | 40 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 themes/cadusk.zsh-theme diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 741ba1ffc..5e7d65bbb 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -33,10 +33,3 @@ alias l='ls -lah' alias ll='ls -lh' alias la='ls -lAh' alias sl=ls # often screw this up - -# Git aliases -alias gita='git add -A' -alias gits='git st' -alias gitl='git l' -alias gitw='git who' -alias gitt='git tags' diff --git a/templates/zshrc-linux.zsh b/templates/zshrc-linux.zsh index 97ec10e11..2d63750da 100644 --- a/templates/zshrc-linux.zsh +++ b/templates/zshrc-linux.zsh @@ -6,7 +6,7 @@ ZSH=$HOME/.oh-my-zsh # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. # ZSH_THEME="afowler" -ZSH_THEME="mh" +ZSH_THEME="cadusk" # Example aliases # alias zshconfig="mate ~/.zshrc" @@ -40,6 +40,7 @@ if [ -z "$LC_ALL" ]; then export LC_ALL=en_US.UTF-8; fi if [ -z "$LANG" ]; then export LANG=en_US.UTF-8; fi if [ -e $HOME/bin ]; then export PATH="$HOME/bin:$PATH"; fi +if [ -e $HOME/.local/bin ]; then export PATH="$HOME/.local/bin:$PATH"; fi if [ -e $HOME/appengine ]; then export PATH="$HOME/appengine:$PATH"; fi if [ -e $HOME/.cabal/bin ]; then export PATH="$HOME/.cabal/bin:$PATH"; fi diff --git a/templates/zshrc-mac.zsh b/templates/zshrc-mac.zsh index 6fabcd183..70bdd4312 100644 --- a/templates/zshrc-mac.zsh +++ b/templates/zshrc-mac.zsh @@ -6,7 +6,7 @@ ZSH=$HOME/.oh-my-zsh # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. # ZSH_THEME="afowler" -ZSH_THEME="mh" +ZSH_THEME="cadusk" # Example aliases # alias zshconfig="mate ~/.zshrc" diff --git a/themes/cadusk.zsh-theme b/themes/cadusk.zsh-theme new file mode 100644 index 000000000..5a39721c5 --- /dev/null +++ b/themes/cadusk.zsh-theme @@ -0,0 +1,40 @@ +# cadusk ZSH Theme - customized on top of avit theme + +PROMPT=' +$(_user_host) ${_current_dir} $(git_prompt_info) +$ ' +PROMPT2='%{$fg[white]%}$%{$reset_color%} ' + +RPROMPT='%{$(echotc UP 1)%} $(git_prompt_status) ${_return_status}%{$(echotc DO 1)%}' + +local _current_dir="%F{208}%3~%{$reset_color%} " +local _return_status="%{$fg[red]%}%(?..⍉)%{$reset_color%}" +local _hist_no="%{$fg[grey]%}%h%{$reset_color%}" + +function _user_host() { + me="%{$fg_bold[white]%}%n" + + if [[ -n $SSH_CONNECTION ]]; then + me="$me%{$fg_bold[cyan]%}@%m" + fi + echo "$me%b%{$reset_color%}" +} + +if [[ $USER == "root" ]]; then + CARETCOLOR="red" +else + CARETCOLOR="white" +fi + +MODE_INDICATOR="%{$fg_bold[yellow]%}❮%{$reset_color%}%{$fg[yellow]%}❮❮%{$reset_color%}" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}(%{$fg_bold[yellow]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +# LS colors, made with http://geoff.greer.fm/lscolors/ +export LSCOLORS="exfxcxdxbxegedabagacad" +export LS_COLORS='di=36;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:' +export GREP_COLOR='1;33' +