mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
Merge branch 'master' of http://github.com/robbyrussell/oh-my-zsh
This commit is contained in:
commit
2b55ee0753
83 changed files with 3179 additions and 215 deletions
22
themes/alanpeabody.zsh-theme
Normal file
22
themes/alanpeabody.zsh-theme
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}'
|
||||
local pwd='%{$fg[blue]%}%~%{$reset_color%}'
|
||||
local rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
|
||||
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
|
||||
local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
|
||||
|
||||
PROMPT="${user} ${pwd}$ "
|
||||
RPROMPT="${return_code} ${git_branch} ${rvm}"
|
||||
|
||||
20
themes/blinks.zsh-theme
Normal file
20
themes/blinks.zsh-theme
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# https://github.com/blinks zsh theme
|
||||
|
||||
function _prompt_char() {
|
||||
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
||||
echo "%{%F{blue}%}±%{%f%k%b%}"
|
||||
else
|
||||
echo ' '
|
||||
fi
|
||||
}
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" [%{%B%F{blue}%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{black}%B%F{green}%}]"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{%F{red}%}*%{%f%k%b%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
PROMPT='%{%f%k%b%}
|
||||
%{%K{black}%B%F{green}%}%n%{%B%F{blue}%}@%{%B%F{cyan}%}%m%{%B%F{green}%} %{%b%F{yellow}%K{black}%}%~%{%B%F{green}%}$(git_prompt_info)%E%{%f%k%b%}
|
||||
%{%K{black}%}$(_prompt_char)%{%K{black}%} %#%{%f%k%b%} '
|
||||
|
||||
RPROMPT='!%{%B%F{cyan}%}%!%{%f%k%b%}'
|
||||
14
themes/dpoggi.zsh-theme
Normal file
14
themes/dpoggi.zsh-theme
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}@%{$fg[cyan]%}%m\
|
||||
%{$reset_color%}:%{$fg[magenta]%}%~\
|
||||
$(git_prompt_info) \
|
||||
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
|
||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||
RPS1='${return_code}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}○%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}⚡%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
|
||||
|
|
@ -3,7 +3,18 @@
|
|||
local user_color='green'; [ $UID -eq 0 ] && user_color='red'
|
||||
PROMPT='%n@%m %{$fg[$user_color]%}%~%{$reset_color%}%(!.#.>) '
|
||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||
RPS1='%(?..%{$fg[red]%}%? ↵%{$reset_color%})$(git_prompt_info)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"
|
||||
RPROMPT='${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" "
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}+"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[blue]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}-"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[magenta]%}>"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[yellow]%}#"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[cyan]%}?"
|
||||
|
|
|
|||
6
themes/fwalch.zsh-theme
Normal file
6
themes/fwalch.zsh-theme
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
PROMPT='%{$fg_bold[green]%}%p %{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
||||
26
themes/humza.zsh-theme
Normal file
26
themes/humza.zsh-theme
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# ZSH THEME Preview: https://skitch.com/huyy/rk979/humza.zshtheme
|
||||
|
||||
let TotalBytes=0
|
||||
for Bytes in $(ls -l | grep "^-" | awk '{ print $5 }')
|
||||
do
|
||||
let TotalBytes=$TotalBytes+$Bytes
|
||||
done
|
||||
# should it say b, kb, Mb, or Gb
|
||||
if [ $TotalBytes -lt 1024 ]; then
|
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes \nquit" | bc)
|
||||
suffix="b"
|
||||
elif [ $TotalBytes -lt 1048576 ]; then
|
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes/1024 \nquit" | bc)
|
||||
suffix="kb"
|
||||
elif [ $TotalBytes -lt 1073741824 ]; then
|
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc)
|
||||
suffix="Mb"
|
||||
else
|
||||
TotalSize=$(echo -e "scale=3 \n$TotalBytes/1073741824 \nquit" | bc)
|
||||
suffix="Gb"
|
||||
fi
|
||||
|
||||
PROMPT='%{$reset_color%}%n %{$fg[green]%}{%{$reset_color%}%~%{$fg[green]%}}%{$reset_color%}$(git_prompt_info) greetings, earthling %{$fg[green]%}[%{$reset_color%}%{$TotalSize%}%{$suffix%}%{$fg[green]%}]%{$fg[red]%}$%{$reset_color%} ☞ '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}±("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=");%{$reset_color%}"
|
||||
4
themes/jispwoso.zsh-theme
Normal file
4
themes/jispwoso.zsh-theme
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
PROMPT=$'%{$fg[green]%}%n@%m: %{$reset_color%}%{$fg[blue]%}%/%{$reset_color%}
|
||||
%{$fg_bold[red]%}➜ %{$reset_color%} '
|
||||
|
||||
PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
PROMPT="%{$fg_bold[cyan]%}%T%{$fg_bold[green]%} %{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m %{$fg_bold[green]%}%d
|
||||
%{$fg_bold[yellow]%}%% $(git_prompt_info)%{$reset_color%}"
|
||||
%{$fg_bold[yellow]%}%% %{$reset_color%}"
|
||||
|
||||
#ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||
#ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
|
|
|
|||
|
|
@ -3,8 +3,22 @@
|
|||
|
||||
local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(git_prompt_info)%{$reset_color%}%B»%b '
|
||||
function my_git_prompt_info() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
GIT_STATUS=$(git_prompt_status)
|
||||
[[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS"
|
||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
}
|
||||
|
||||
PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(my_git_prompt_info)%{$reset_color%}%B»%b '
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="+"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="*"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="~"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="!"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="?"
|
||||
|
||||
|
|
|
|||
8
themes/miloshadzic.zsh-theme
Normal file
8
themes/miloshadzic.zsh-theme
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Yay! High voltage and arrows!
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
PROMPT='%{$fg[cyan]%}%1~%{$reset_color%}%{$fg[red]%}|%{$reset_color%}$(git_prompt_info)%{$fg[cyan]%}⇒%{$reset_color%} '
|
||||
15
themes/minimal.zsh-theme
Normal file
15
themes/minimal.zsh-theme
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
||||
git_custom_status() {
|
||||
local cb=$(current_branch)
|
||||
if [ -n "$cb" ]; then
|
||||
echo "- $ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
PROMPT='%2~ $(git_custom_status) »%b '
|
||||
17
themes/nebirhos.zsh-theme
Normal file
17
themes/nebirhos.zsh-theme
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Based on robbyrussell's theme, with host and rvm indicators. Example:
|
||||
# @host ➜ currentdir rvm:(rubyversion@gemset) git:(branchname)
|
||||
|
||||
# Get the current ruby version in use with RVM:
|
||||
if [ -e ~/.rvm/bin/rvm-prompt ]; then
|
||||
RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%})%{$reset_color%} "
|
||||
fi
|
||||
|
||||
# Get the host name (first 4 chars)
|
||||
HOST_PROMPT_="%{$fg_bold[red]%}@$HOST[0,4] ➜ %{$fg_bold[cyan]%}%c "
|
||||
GIT_PROMPT="%{$fg_bold[blue]%}\$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}"
|
||||
PROMPT="$HOST_PROMPT_$RUBY_PROMPT_$GIT_PROMPT"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
||||
11
themes/obraun.zsh-theme
Normal file
11
themes/obraun.zsh-theme
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
|
||||
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%{$fg[green]%}[%*]%{$reset_color%} %{$fg_no_bold[cyan]%}%n %{${fg_bold[blue]}%}::%{$reset_color%} %{$fg[yellow]%}%m%{$reset_color%} %{$fg_no_bold[magenta]%} ➜ %{$reset_color%} %{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
|
||||
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||
|
||||
|
|
@ -7,8 +7,8 @@ RPROMPT='[%*]'
|
|||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}%B"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="*"
|
||||
|
||||
# LS colors, made with http://geoff.greer.fm/lscolors/
|
||||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
|
||||
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:*.patch=00;34:*.o=00;32:*.so=01;35:*.ko=01;31:*.la=00;33'
|
||||
|
|
|
|||
15
themes/re5et.zsh-theme
Normal file
15
themes/re5et.zsh-theme
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="magenta"; fi
|
||||
|
||||
local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})"
|
||||
|
||||
PROMPT='
|
||||
%{$fg_bold[cyan]%}%n%{$reset_color%}%{$fg[yellow]%}@%{$reset_color%}%{$fg_bold[blue]%}%m%{$reset_color%}:%{${fg_bold[green]}%}%~%{$reset_color%}$(git_prompt_info)
|
||||
%{${fg[$CARETCOLOR]}%}%# %{${reset_color}%}'
|
||||
|
||||
RPS1='${return_code} %D - %*'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[magenta]%}^%{$reset_color%}%{$fg_bold[yellow]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%} ±"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ?"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[red]%} ♥"
|
||||
6
themes/simple.zsh-theme
Normal file
6
themes/simple.zsh-theme
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
PROMPT='%{$fg[green]%}%~%{$fg_bold[blue]%}$(git_prompt_info)%{$reset_color%} '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" ✗"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" ✔"
|
||||
91
themes/smt.zsh-theme
Normal file
91
themes/smt.zsh-theme
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
# -----------------------------------------------------------------------------
|
||||
# FILE: smt.zsh-theme
|
||||
# DESCRIPTION: oh-my-zsh theme file, based on dogenpunk by Matthew Nelson.
|
||||
# AUTHOR: Stephen Tudor (stephen@tudorstudio.com
|
||||
# VERSION: 0.1
|
||||
# SCREENSHOT: coming soon
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
|
||||
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%} "
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="|"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}⚡%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[red]%}!%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✓%{$reset_color%}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
|
||||
|
||||
# Format for git_prompt_long_sha() and git_prompt_short_sha()
|
||||
ZSH_THEME_GIT_PROMPT_SHA_BEFORE="➤ %{$fg_bold[yellow]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}"
|
||||
|
||||
function prompt_char() {
|
||||
git branch >/dev/null 2>/dev/null && echo "%{$fg[green]%}±%{$reset_color%}" && return
|
||||
hg root >/dev/null 2>/dev/null && echo "%{$fg_bold[red]%}☿%{$reset_color%}" && return
|
||||
echo "%{$fg[cyan]%}◯%{$reset_color%}"
|
||||
}
|
||||
|
||||
# Colors vary depending on time lapsed.
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
|
||||
|
||||
# Determine the time since last commit. If branch is clean,
|
||||
# use a neutral color, otherwise colors will vary according to time.
|
||||
function git_time_since_commit() {
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
# Only proceed if there is actually a commit.
|
||||
if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then
|
||||
# Get the last commit.
|
||||
last_commit=`git log --pretty=format:'%at' -1 2> /dev/null`
|
||||
now=`date +%s`
|
||||
seconds_since_last_commit=$((now-last_commit))
|
||||
|
||||
# Totals
|
||||
MINUTES=$((seconds_since_last_commit / 60))
|
||||
HOURS=$((seconds_since_last_commit/3600))
|
||||
|
||||
# Sub-hours and sub-minutes
|
||||
DAYS=$((seconds_since_last_commit / 86400))
|
||||
SUB_HOURS=$((HOURS % 24))
|
||||
SUB_MINUTES=$((MINUTES % 60))
|
||||
|
||||
if [[ -n $(git status -s 2> /dev/null) ]]; then
|
||||
if [ "$MINUTES" -gt 30 ]; then
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"
|
||||
elif [ "$MINUTES" -gt 10 ]; then
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM"
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT"
|
||||
fi
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
|
||||
fi
|
||||
|
||||
if [ "$HOURS" -gt 24 ]; then
|
||||
echo "[$COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}]"
|
||||
elif [ "$MINUTES" -gt 60 ]; then
|
||||
echo "[$COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}]"
|
||||
else
|
||||
echo "[$COLOR${MINUTES}m%{$reset_color%}]"
|
||||
fi
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
|
||||
echo "[$COLOR~]"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
PROMPT='
|
||||
%{$fg[blue]%}%m%{$reset_color%} 福 %{$fg[cyan]%}%~ %{$reset_color%}$(git_prompt_short_sha)$(git_prompt_info)
|
||||
%{$fg[red]%}%!%{$reset_color%} $(prompt_char) : '
|
||||
|
||||
RPROMPT='${return_status}$(git_time_since_commit)$(git_prompt_status)%{$reset_color%}'
|
||||
100
themes/steeef.zsh-theme
Normal file
100
themes/steeef.zsh-theme
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
# prompt style and colors based on Steve Losh's Prose theme:
|
||||
# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme
|
||||
#
|
||||
# vcs_info modifications from Bart Trojanowski's zsh prompt:
|
||||
# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt
|
||||
#
|
||||
# git untracked files modification from Brian Carper:
|
||||
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
|
||||
|
||||
function virtualenv_info {
|
||||
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
||||
}
|
||||
PR_GIT_UPDATE=1
|
||||
|
||||
setopt prompt_subst
|
||||
autoload colors
|
||||
colors
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
#use extended color pallete if available
|
||||
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
|
||||
turquoise="%F{81}"
|
||||
orange="%F{166}"
|
||||
purple="%F{135}"
|
||||
hotpink="%F{161}"
|
||||
limegreen="%F{118}"
|
||||
else
|
||||
turquoise="$fg[cyan]"
|
||||
orange="$fg[yellow]"
|
||||
purple="$fg[magenta]"
|
||||
hotpink="$fg[red]"
|
||||
limegreen="$fg[green]"
|
||||
fi
|
||||
|
||||
# enable VCS systems you use
|
||||
zstyle ':vcs_info:*' enable git svn
|
||||
|
||||
# check-for-changes can be really slow.
|
||||
# you should disable it, if you work with large repositories
|
||||
zstyle ':vcs_info:*:prompt:*' check-for-changes true
|
||||
|
||||
# set formats
|
||||
# %b - branchname
|
||||
# %u - unstagedstr (see below)
|
||||
# %c - stagedstr (see below)
|
||||
# %a - action (e.g. rebase-i)
|
||||
# %R - repository path
|
||||
# %S - path in the repository
|
||||
PR_RST="%{${reset_color}%}"
|
||||
FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})"
|
||||
FMT_ACTION="(%{$limegreen%}%a${PR_RST})"
|
||||
FMT_UNSTAGED="%{$orange%}●"
|
||||
FMT_STAGED="%{$limegreen%}●"
|
||||
|
||||
zstyle ':vcs_info:*:prompt:*' unstagedstr "${FMT_UNSTAGED}"
|
||||
zstyle ':vcs_info:*:prompt:*' stagedstr "${FMT_STAGED}"
|
||||
zstyle ':vcs_info:*:prompt:*' actionformats "${FMT_BRANCH}${FMT_ACTION}"
|
||||
zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}"
|
||||
zstyle ':vcs_info:*:prompt:*' nvcsformats ""
|
||||
|
||||
|
||||
function steeef_preexec {
|
||||
case "$(history $HISTCMD)" in
|
||||
*git*)
|
||||
PR_GIT_UPDATE=1
|
||||
;;
|
||||
*svn*)
|
||||
PR_GIT_UPDATE=1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
add-zsh-hook preexec steeef_preexec
|
||||
|
||||
function steeef_chpwd {
|
||||
PR_GIT_UPDATE=1
|
||||
}
|
||||
add-zsh-hook chpwd steeef_chpwd
|
||||
|
||||
function steeef_precmd {
|
||||
if [[ -n "$PR_GIT_UPDATE" ]] ; then
|
||||
# check for untracked files or updated submodules, since vcs_info doesn't
|
||||
if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
|
||||
PR_GIT_UPDATE=1
|
||||
FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})"
|
||||
else
|
||||
FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})"
|
||||
fi
|
||||
zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}"
|
||||
|
||||
vcs_info 'prompt'
|
||||
PR_GIT_UPDATE=
|
||||
fi
|
||||
}
|
||||
add-zsh-hook precmd steeef_precmd
|
||||
|
||||
PROMPT=$'
|
||||
%{$purple%}%n%{$reset_color%} at %{$orange%}%m%{$reset_color%} in %{$limegreen%}%~%{$reset_color%} $vcs_info_msg_0_
|
||||
$(virtualenv_info)$ '
|
||||
26
themes/sunaku.zsh-theme
Normal file
26
themes/sunaku.zsh-theme
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Git-centric variation of the "fishy" theme.
|
||||
# See screenshot at http://ompldr.org/vOHcwZg
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}+"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[magenta]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}-"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}>"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[cyan]%}#"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[yellow]%}?"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=" "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
local user_color='green'
|
||||
test $UID -eq 0 && user_color='red'
|
||||
|
||||
PROMPT='%(?..%{$fg_bold[red]%}exit %?
|
||||
%{$reset_color%})'\
|
||||
'%{$bold_color%}$(git_prompt_status)%{$reset_color%}'\
|
||||
'$(git_prompt_info)'\
|
||||
'%{$fg[$user_color]%}%~%{$reset_color%}'\
|
||||
'%(!.#.>) '
|
||||
|
||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||
96
themes/sunrise.zsh-theme
Normal file
96
themes/sunrise.zsh-theme
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
# Sunrise theme for oh-my-zsh by Adam Lindberg (eproxus@gmail.com)
|
||||
# Intended to be used with Solarized: http://ethanschoonover.com/solarized
|
||||
# (Needs Git plugin for current_branch method)
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Color shortcuts
|
||||
R=$fg[red]
|
||||
G=$fg[green]
|
||||
M=$fg[magenta]
|
||||
RB=$fg_bold[red]
|
||||
YB=$fg_bold[yellow]
|
||||
BB=$fg_bold[blue]
|
||||
RESET=$reset_color
|
||||
|
||||
if [ "$(whoami)" = "root" ]; then
|
||||
PROMPTCOLOR="%{$RB%}" PREFIX="-!-";
|
||||
else
|
||||
PROMPTCOLOR="" PREFIX="---";
|
||||
fi
|
||||
|
||||
local return_code="%(?..%{$R%}%? ↵%{$RESET%})"
|
||||
|
||||
# Get the status of the working tree (copied and modified from git.zsh)
|
||||
custom_git_prompt_status() {
|
||||
INDEX=$(git status --porcelain 2> /dev/null)
|
||||
STATUS=""
|
||||
# Non-staged
|
||||
if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^.M ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
||||
elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
||||
elif $(echo "$INDEX" | grep '^ T ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
||||
fi
|
||||
# Staged
|
||||
if $(echo "$INDEX" | grep '^D ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_DELETED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^R' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_RENAMED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^M' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_MODIFIED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^A' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_ADDED$STATUS"
|
||||
fi
|
||||
|
||||
if $(echo -n "$STATUS" | grep '.*' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_STATUS_PREFIX$STATUS"
|
||||
fi
|
||||
|
||||
echo $STATUS
|
||||
}
|
||||
|
||||
# get the name of the branch we are on (copied and modified from git.zsh)
|
||||
function custom_git_prompt() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$(git_prompt_ahead)$(custom_git_prompt_status)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
}
|
||||
|
||||
# %B sets bold text
|
||||
PROMPT='%B$PREFIX %2~ $(custom_git_prompt)%{$M%}%B»%b%{$RESET%} '
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$YB%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$YB%}›%{$RESET%} "
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$R%}*"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD="%{$BB%}➔"
|
||||
|
||||
ZSH_THEME_GIT_STATUS_PREFIX=" "
|
||||
|
||||
# Staged
|
||||
ZSH_THEME_GIT_PROMPT_STAGED_ADDED="%{$G%}A"
|
||||
ZSH_THEME_GIT_PROMPT_STAGED_MODIFIED="%{$G%}M"
|
||||
ZSH_THEME_GIT_PROMPT_STAGED_RENAMED="%{$G%}R"
|
||||
ZSH_THEME_GIT_PROMPT_STAGED_DELETED="%{$G%}D"
|
||||
|
||||
# Not-staged
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$R%}⁇"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$R%}M"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$R%}D"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$R%}UU"
|
||||
18
themes/superjarin.zsh-theme
Normal file
18
themes/superjarin.zsh-theme
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Grab the current version of ruby in use (via RVM): [ruby-1.8.7]
|
||||
JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
|
||||
|
||||
# Grab the current filepath, use shortcuts: ~/Desktop
|
||||
# Append the current git branch, if in a git repository
|
||||
JARIN_CURRENT_LOCA_="%{$fg_bold[cyan]%}%~\$(git_prompt_info)%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%} <%{$fg[magenta]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
|
||||
# Do nothing if the branch is clean (no changes).
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%}>"
|
||||
|
||||
# Add a yellow ✗ if the branch is dirty
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}> %{$fg[yellow]%}✗"
|
||||
|
||||
# Put it all together!
|
||||
PROMPT="$JARIN_CURRENT_RUBY_ $JARIN_CURRENT_LOCA_ "
|
||||
|
||||
9
themes/terminalparty.zsh-theme
Normal file
9
themes/terminalparty.zsh-theme
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
PROMPT='%{$fg[green]%} %% '
|
||||
# RPS1='%{$fg[blue]%}%~%{$reset_color%} '
|
||||
RPS1='%{$fg[white]%}%2~$(git_prompt_info) %{$fg_bold[blue]%}%m%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[yellow]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ⚡%{$fg[yellow]%}"
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo '±' && return
|
||||
hg root >/dev/null 2>/dev/null && echo '☿' && return
|
||||
echo '○'
|
||||
}
|
||||
|
||||
function virtualenv_info {
|
||||
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
||||
}
|
||||
|
||||
function hg_prompt_info {
|
||||
hg prompt --angle-brackets "\
|
||||
< on %{$fg[magenta]%}<branch>%{$reset_color%}>\
|
||||
< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
|
||||
%{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
|
||||
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
|
||||
}
|
||||
|
||||
PROMPT='
|
||||
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
|
||||
$(virtualenv_info)$(prompt_char) '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
. ~/bin/dotfiles/zsh/aliases
|
||||
95
themes/trapd00r.zsh-theme
Normal file
95
themes/trapd00r.zsh-theme
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
# Name: trapd00r zsh theme
|
||||
# Author: Magnus Woldrich <m@japh.se>
|
||||
#
|
||||
# This theme needs a terminal supporting 256 colors as well as unicode. It also
|
||||
# needs the script that splits up the current path and makes it fancy as located
|
||||
# here: https://github.com/trapd00r/utils/blob/master/zsh_path
|
||||
#
|
||||
# By default it spans over two lines like so:
|
||||
#
|
||||
# scp1@shiva:pts/9-> /home » scp1 (0)
|
||||
# >
|
||||
#
|
||||
# that's user@host:pts/-> splitted path (return status)
|
||||
#
|
||||
# If the current directory is a git repository, we span 3 lines;
|
||||
#
|
||||
# git❨ master ❩ DIRTY
|
||||
# scp1@shiva:pts/4-> /home » scp1 » dev » utils (0)
|
||||
# >
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
local c0=$( printf "\e[m")
|
||||
local c1=$( printf "\e[38;5;245m")
|
||||
local c2=$( printf "\e[38;5;250m")
|
||||
local c3=$( printf "\e[38;5;242m")
|
||||
local c4=$( printf "\e[38;5;197m")
|
||||
local c5=$( printf "\e[38;5;225m")
|
||||
local c6=$( printf "\e[38;5;240m")
|
||||
local c7=$( printf "\e[38;5;242m")
|
||||
local c8=$( printf "\e[38;5;244m")
|
||||
local c9=$( printf "\e[38;5;162m")
|
||||
local c10=$(printf "\e[1m")
|
||||
local c11=$(printf "\e[38;5;208m\e[1m")
|
||||
local c12=$(printf "\e[38;5;142m\e[1m")
|
||||
local c13=$(printf "\e[38;5;196m\e[1m")
|
||||
|
||||
|
||||
# We dont want to use the extended colorset in the TTY / VC.
|
||||
if [ "$TERM" = "linux" ]; then
|
||||
c1=$( printf "\e[34;1m")
|
||||
c2=$( printf "\e[35m")
|
||||
c3=$( printf "\e[31m")
|
||||
c4=$( printf "\e[31;1m")
|
||||
c5=$( printf "\e[32m")
|
||||
c6=$( printf "\e[32;1m")
|
||||
c7=$( printf "\e[33m")
|
||||
c8=$( printf "\e[33;1m")
|
||||
c9=$( printf "\e[34m")
|
||||
|
||||
c11=$(printf "\e[35;1m")
|
||||
c12=$(printf "\e[36m")
|
||||
c13=$(printf "\e[31;1m")
|
||||
fi
|
||||
|
||||
zstyle ':vcs_info:*' actionformats \
|
||||
'%{$c8%}(%f%s)%{$c7%}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
|
||||
|
||||
zstyle ':vcs_info:*' formats \
|
||||
"%{$c8%}%s%%{$c7%}❨ %{$c9%}%{$c11%}%b%{$c7%} ❩%{$reset_color%}%f "
|
||||
|
||||
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
|
||||
zstyle ':vcs_info:*' enable git
|
||||
|
||||
add-zsh-hook precmd prompt_jnrowe_precmd
|
||||
|
||||
prompt_jnrowe_precmd () {
|
||||
vcs_info
|
||||
if [ "${vcs_info_msg_0_}" = "" ]; then
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
|
||||
> '
|
||||
|
||||
# modified, to be commited
|
||||
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='${vcs_info_msg_0_}%{$30%} %{$bg_bold[red]%}%{$fg_bold[cyan]%}C%{$fg_bold[black]%}OMMIT%{$reset_color%}
|
||||
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
|
||||
> '
|
||||
|
||||
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='${vcs_info_msg_0_}%{$bg_bold[red]%}%{$fg_bold[blue]%}D%{$fg_bold[black]%}IRTY%{$reset_color%}
|
||||
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
|
||||
%{$c13%}>%{$c0%} '
|
||||
else
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='${vcs_info_msg_0_}
|
||||
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
|
||||
> '
|
||||
fi
|
||||
}
|
||||
|
||||
# vim: set ft=zsh sw=2 et tw=0:
|
||||
107
themes/wedisagree.zsh-theme
Normal file
107
themes/wedisagree.zsh-theme
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
# On a mac with snow leopard, for nicer terminal colours:
|
||||
|
||||
# - Install SIMBL: http://www.culater.net/software/SIMBL/SIMBL.php
|
||||
# - Download'Terminal-Colours': http://bwaht.net/code/TerminalColours.bundle.zip
|
||||
# - Place that bundle in ~/Library/Application\ Support/SIMBL/Plugins (create that folder if it doesn't exist)
|
||||
# - Open Terminal preferences. Go to Settings -> Text -> More
|
||||
# - Change default colours to your liking.
|
||||
#
|
||||
# Here are the colours from Textmate's Monokai theme:
|
||||
#
|
||||
# Black: 0, 0, 0
|
||||
# Red: 229, 34, 34
|
||||
# Green: 166, 227, 45
|
||||
# Yellow: 252, 149, 30
|
||||
# Blue: 196, 141, 255
|
||||
# Magenta: 250, 37, 115
|
||||
# Cyan: 103, 217, 240
|
||||
# White: 242, 242, 242
|
||||
|
||||
# Thanks to Steve Losh: http://stevelosh.com/blog/2009/03/candy-colored-terminal/
|
||||
|
||||
# The prompt
|
||||
|
||||
PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}'
|
||||
|
||||
# The right-hand prompt
|
||||
|
||||
RPROMPT='${time} %{$fg[magenta]%}$(git_prompt_info)%{$reset_color%}$(git_prompt_status)%{$reset_color%}'
|
||||
|
||||
# Add this at the start of RPROMPT to include rvm info showing ruby-version@gemset-name
|
||||
# %{$fg[yellow]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%}
|
||||
|
||||
# local time, color coded by last return code
|
||||
time_enabled="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}"
|
||||
time_disabled="%{$fg[green]%}%*%{$reset_color%}"
|
||||
time=$time_enabled
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" ☁ %{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%} ☂" # Ⓓ
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" # ⓣ
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ☀" # Ⓞ
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✚" # ⓐ ⑃
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ⚡" # ⓜ ⑁
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" # ⓧ ⑂
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➜" # ⓡ ⑄
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ♒" # ⓤ ⑊
|
||||
|
||||
# More symbols to choose from:
|
||||
# ☀ ✹ ☄ ♆ ♀ ♁ ♐ ♇ ♈ ♉ ♚ ♛ ♜ ♝ ♞ ♟ ♠ ♣ ⚢ ⚲ ⚳ ⚴ ⚥ ⚤ ⚦ ⚒ ⚑ ⚐ ♺ ♻ ♼ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷
|
||||
# ✡ ✔ ✖ ✚ ✱ ✤ ✦ ❤ ➜ ➟ ➼ ✂ ✎ ✐ ⨀ ⨁ ⨂ ⨍ ⨎ ⨏ ⨷ ⩚ ⩛ ⩡ ⩱ ⩲ ⩵ ⩶ ⨠
|
||||
# ⬅ ⬆ ⬇ ⬈ ⬉ ⬊ ⬋ ⬒ ⬓ ⬔ ⬕ ⬖ ⬗ ⬘ ⬙ ⬟ ⬤ 〒 ǀ ǁ ǂ ĭ Ť Ŧ
|
||||
|
||||
# Determine if we are using a gemset.
|
||||
function rvm_gemset() {
|
||||
GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
|
||||
if [[ -n $GEMSET ]]; then
|
||||
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
|
||||
fi
|
||||
}
|
||||
|
||||
# Determine the time since last commit. If branch is clean,
|
||||
# use a neutral color, otherwise colors will vary according to time.
|
||||
function git_time_since_commit() {
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
# Only proceed if there is actually a commit.
|
||||
if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then
|
||||
# Get the last commit.
|
||||
last_commit=`git log --pretty=format:'%at' -1 2> /dev/null`
|
||||
now=`date +%s`
|
||||
seconds_since_last_commit=$((now-last_commit))
|
||||
|
||||
# Totals
|
||||
MINUTES=$((seconds_since_last_commit / 60))
|
||||
HOURS=$((seconds_since_last_commit/3600))
|
||||
|
||||
# Sub-hours and sub-minutes
|
||||
DAYS=$((seconds_since_last_commit / 86400))
|
||||
SUB_HOURS=$((HOURS % 24))
|
||||
SUB_MINUTES=$((MINUTES % 60))
|
||||
|
||||
if [[ -n $(git status -s 2> /dev/null) ]]; then
|
||||
if [ "$MINUTES" -gt 30 ]; then
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"
|
||||
elif [ "$MINUTES" -gt 10 ]; then
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM"
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT"
|
||||
fi
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
|
||||
fi
|
||||
|
||||
if [ "$HOURS" -gt 24 ]; then
|
||||
echo "($(rvm_gemset)$COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
|
||||
elif [ "$MINUTES" -gt 60 ]; then
|
||||
echo "($(rvm_gemset)$COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
|
||||
else
|
||||
echo "($(rvm_gemset)$COLOR${MINUTES}m%{$reset_color%}|"
|
||||
fi
|
||||
else
|
||||
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
|
||||
echo "($(rvm_gemset)$COLOR~|"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue