Merge pull request #648 from SFEley/d926a55872b5a12ab8b987e9d86c02358d0c825e
New theme - Crunch
Diff
1diff --git a/themes/crunch.zsh-theme b/themes/crunch.zsh-theme
2new file mode 100644
3index 0000000000000000000000000000000000000000..2473cd230e9f95e303bd0f5ff4c4434b020e4bfe
4--- /dev/null
5+++ b/themes/crunch.zsh-theme
6@@ -0,0 +1,37 @@
7+# CRUNCH - created from Steve Eley's cat waxing.
8+# Initially hacked from the Dallas theme. Thanks, Dallas Reedy.
9+#
10+# This theme assumes you do most of your oh-my-zsh'ed "colorful" work at a single machine,
11+# and eschews the standard space-consuming user and hostname info. Instead, only the
12+# things that vary in my own workflow are shown:
13+#
14+# * The time (not the date)
15+# * The RVM version and gemset (omitting the 'ruby' name if it's MRI)
16+# * The current directory
17+# * The Git branch and its 'dirty' state
18+#
19+# Colors are at the top so you can mess with those separately if you like.
20+# For the most part I stuck with Dallas's.
21+
22+CRUNCH_BRACKET_COLOR="%{$fg[white]%}"
23+CRUNCH_TIME_COLOR="%{$fg[yellow]%}"
24+CRUNCH_RVM_COLOR="%{$fg[magenta]%}"
25+CRUNCH_DIR_COLOR="%{$fg[cyan]%}"
26+CRUNCH_GIT_BRANCH_COLOR="%{$fg[green]%}"
27+CRUNCH_GIT_CLEAN_COLOR="%{$fg[green]%}"
28+CRUNCH_GIT_DIRTY_COLOR="%{$fg[red]%}"
29+
30+# These Git variables are used by the oh-my-zsh git_prompt_info helper:
31+ZSH_THEME_GIT_PROMPT_PREFIX="$CRUNCH_BRACKET_COLOR:$CRUNCH_GIT_BRANCH_COLOR"
32+ZSH_THEME_GIT_PROMPT_SUFFIX=""
33+ZSH_THEME_GIT_PROMPT_CLEAN=" $CRUNCH_GIT_CLEAN_COLOR✓"
34+ZSH_THEME_GIT_PROMPT_DIRTY=" $CRUNCH_GIT_DIRTY_COLOR✗"
35+
36+# Our elements:
37+CRUNCH_TIME_="$CRUNCH_BRACKET_COLOR{$CRUNCH_TIME_COLOR%T$CRUNCH_BRACKET_COLOR}%{$reset_color%}"
38+CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(~/.rvm/bin/rvm-prompt i v g)#ruby-}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
39+CRUNCH_DIR_="$CRUNCH_DIR_COLOR%~\$(git_prompt_info) "
40+CRUNCH_PROMPT="$CRUNCH_BRACKET_COLOR➭ "
41+
42+# Put it all together!
43+PROMPT="$CRUNCH_TIME_$CRUNCH_RVM_$CRUNCH_DIR_$CRUNCH_PROMPT%{$reset_color%}"