Skip to content

Instantly share code, notes, and snippets.

@workmad3
Created April 17, 2015 23:25
Show Gist options
  • Save workmad3/33c3bb821cae9c90a3f4 to your computer and use it in GitHub Desktop.
Save workmad3/33c3bb821cae9c90a3f4 to your computer and use it in GitHub Desktop.
# My theme - [email protected]
# Based on Fino theme with bits from dallas and robbyrussell
# Fino notes:
# Use with a dark background and 256-color terminal!
# Meant for people with RVM and git. Tested only on OS X 10.7.
# You can set your computer name in the ~/.box-name file if you want.
# Borrowing shamelessly from these oh-my-zsh themes:
# bira
# robbyrussell
# Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
function prompt_char {
echo "%{$fg[yellow]%}⚑%{$reset_color%}"
}
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || hostname -s
}
function box_name_prompt {
echo "%{$fg[blue]%}πŸ’» $(box_name)%{$reset_color%}"
}
function last_status {
echo "%(?,%{$fg[green]%}😸 ,%{$fg[red]%}😾 )$RETVAL%{$reset_color%}"
}
function ruby_prompt {
echo "%{$fg[red]%}πŸ’Ž ${RUBY_ENGINE}-${RUBY_VERSION}%{$reset_color%}"
}
function folder_prompt {
echo "%{$fg[yellow]%}πŸ“‚ %~%{$reset_color%}"
}
function user_prompt {
echo "%{$fg[green]%}πŸ‘€ %n%{$reset_color%}"
}
build_prompt() {
RETVAL=$?
echo -n "╭─ "
echo -n "$(user_prompt) "
#suppress the newlines here
echo -n "$(box_name_prompt) "
echo -n "$(folder_prompt) "
echo -n "$(git_prompt_info)"
echo -n "$(ruby_prompt) "
#want the newline here
echo "$(vi_mode_prompt_info)"
#Don't care about the newline here, last line
echo "╰─ $(last_status) $(prompt_char) "
}
build_rprompt() {
echo -n "%{$reset_color%}$(battery_pct_prompt) $(emoji-clock) %t"
}
# Replace fino git with a combination of fino+robbyrussell git:
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}πŸ”΄ %{$reset_color%}"
ZSH_THEME_SVN_PROMPT_PREFIX="%{$reset_color%}svn:(%{$fg[red]%}"
ZSH_THEME_SVN_PROMPT_SUFFIX="%{$reset_color%})"
ZSH_THEME_SVN_PROMPT_CLEAN="%{$reset_color%}"
ZSH_THEME_SVN_PROMPT_DIRTY="%{$fg[red]%}πŸ”΄ %{$reset_color%}"
MODE_INDICATOR="%{$fg_bold[white]%}VIM%{$reset_color%}"
PROMPT='$(build_prompt)'
RPROMPT='$(build_rprompt)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment