summaryrefslogtreecommitdiff
path: root/themes/dallas.zsh-theme
diff options
context:
space:
mode:
authorDallas Reedy <code@dallasreedy.com>2010-05-07 11:17:12 -0700
committerDallas Reedy <code@dallasreedy.com>2010-05-07 11:17:12 -0700
commit44cad95ed220a3a3a0c76de15186f395fc6e7ab0 (patch)
tree2ab14277840d2f9373c16b292bbbd68a1186a553 /themes/dallas.zsh-theme
parent74429549856521ea71fb4a3c9e6be0741f7c86f8 (diff)
downloadzsh-44cad95ed220a3a3a0c76de15186f395fc6e7ab0.tar.gz
zsh-44cad95ed220a3a3a0c76de15186f395fc6e7ab0.tar.bz2
zsh-44cad95ed220a3a3a0c76de15186f395fc6e7ab0.zip
updated my theme with the date and git branch (+ dirty or not)
Diffstat (limited to 'themes/dallas.zsh-theme')
-rw-r--r--themes/dallas.zsh-theme26
1 files changed, 19 insertions, 7 deletions
diff --git a/themes/dallas.zsh-theme b/themes/dallas.zsh-theme
index 10e019be0..eef32e998 100644
--- a/themes/dallas.zsh-theme
+++ b/themes/dallas.zsh-theme
@@ -1,14 +1,26 @@
# Personalized!
-# [red][normal][purple][yellow][normal]
-# dallas@lappy ~/Sites %
-# PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% "
-# PROMPT="{white}\{{yellow}{time}{white}\}{green}{host}{white}:{cyan}{pwd} {red,bold}{user}{white}%{normal} "
-DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%T%{$fg[white]%}}%{$reset_color%}"
+# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T}
+DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%D %T%{$fg[white]%}}%{$reset_color%}"
+# Grab the current version of ruby in use (via RVM): [ruby-1.8.7]
DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
+# Grab the current machine name: muscato
DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}"
-DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~%{$reset_color%}"
+# Grab the current filepath, use shortcuts: ~/Desktop
+# Append the current git branch, if in a git repository: ~aw@master
+DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~\$(git_prompt_info)%{$reset_color%}"
+# Grab the current username: dallas
DALLAS_CURRENT_USER_="%{$fg[red]%}%n%{$reset_color%}"
-DALLAS_PROMPT_CHAR_="%{$fg[white]%}%%%{$reset_color%}"
+# Use a % for normal users and a # for privelaged (root) users.
+DALLAS_PROMPT_CHAR_="%{$fg[white]%}%(!.#.%%)%{$reset_color%}"
+# For the git prompt, use a white @ and blue text for the branch name
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}@%{$fg[blue]%}"
+# Close it all off by resetting the color and styles.
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
+# Do nothing if the branch is clean (no changes).
+ZSH_THEME_GIT_PROMPT_CLEAN=""
+# Add 3 cyan ✗s if this branch is diiirrrty! Dirty branch!
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}✗✗✗"
+# Put it all together!
PROMPT="$DALLAS_CURRENT_TIME_$DALLAS_CURRENT_RUBY_$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ "