summaryrefslogtreecommitdiff
path: root/themes/crunch.zsh-theme
diff options
context:
space:
mode:
authorTristan Carel <tcarel@exalead.com>2011-10-10 14:58:28 +0200
committerTristan Carel <tcarel@exalead.com>2011-10-10 14:58:28 +0200
commitdb90589c8a02e98e657af17bb0b460b752d9ed61 (patch)
treed1354a9338bf9921ad0f66d2f5394272e1cfec77 /themes/crunch.zsh-theme
parent7066bf7c6b522af9147ebf03c00361c4c6490d42 (diff)
parent57f04b921ea1c12a0a283331778848cd4011bf21 (diff)
downloadzsh-db90589c8a02e98e657af17bb0b460b752d9ed61.tar.gz
zsh-db90589c8a02e98e657af17bb0b460b752d9ed61.tar.bz2
zsh-db90589c8a02e98e657af17bb0b460b752d9ed61.zip
Merge remote-tracking branch 'upstream/master' into emacs
Conflicts: plugins/emacs/emacs.plugin.zsh plugins/emacs/emacsclient.sh
Diffstat (limited to 'themes/crunch.zsh-theme')
-rw-r--r--themes/crunch.zsh-theme37
1 files changed, 37 insertions, 0 deletions
diff --git a/themes/crunch.zsh-theme b/themes/crunch.zsh-theme
new file mode 100644
index 000000000..2473cd230
--- /dev/null
+++ b/themes/crunch.zsh-theme
@@ -0,0 +1,37 @@
+# CRUNCH - created from Steve Eley's cat waxing.
+# Initially hacked from the Dallas theme. Thanks, Dallas Reedy.
+#
+# This theme assumes you do most of your oh-my-zsh'ed "colorful" work at a single machine,
+# and eschews the standard space-consuming user and hostname info. Instead, only the
+# things that vary in my own workflow are shown:
+#
+# * The time (not the date)
+# * The RVM version and gemset (omitting the 'ruby' name if it's MRI)
+# * The current directory
+# * The Git branch and its 'dirty' state
+#
+# Colors are at the top so you can mess with those separately if you like.
+# For the most part I stuck with Dallas's.
+
+CRUNCH_BRACKET_COLOR="%{$fg[white]%}"
+CRUNCH_TIME_COLOR="%{$fg[yellow]%}"
+CRUNCH_RVM_COLOR="%{$fg[magenta]%}"
+CRUNCH_DIR_COLOR="%{$fg[cyan]%}"
+CRUNCH_GIT_BRANCH_COLOR="%{$fg[green]%}"
+CRUNCH_GIT_CLEAN_COLOR="%{$fg[green]%}"
+CRUNCH_GIT_DIRTY_COLOR="%{$fg[red]%}"
+
+# These Git variables are used by the oh-my-zsh git_prompt_info helper:
+ZSH_THEME_GIT_PROMPT_PREFIX="$CRUNCH_BRACKET_COLOR:$CRUNCH_GIT_BRANCH_COLOR"
+ZSH_THEME_GIT_PROMPT_SUFFIX=""
+ZSH_THEME_GIT_PROMPT_CLEAN=" $CRUNCH_GIT_CLEAN_COLOR✓"
+ZSH_THEME_GIT_PROMPT_DIRTY=" $CRUNCH_GIT_DIRTY_COLOR✗"
+
+# Our elements:
+CRUNCH_TIME_="$CRUNCH_BRACKET_COLOR{$CRUNCH_TIME_COLOR%T$CRUNCH_BRACKET_COLOR}%{$reset_color%}"
+CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(~/.rvm/bin/rvm-prompt i v g)#ruby-}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
+CRUNCH_DIR_="$CRUNCH_DIR_COLOR%~\$(git_prompt_info) "
+CRUNCH_PROMPT="$CRUNCH_BRACKET_COLOR➭ "
+
+# Put it all together!
+PROMPT="$CRUNCH_TIME_$CRUNCH_RVM_$CRUNCH_DIR_$CRUNCH_PROMPT%{$reset_color%}"