mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 09:51:41 +00:00
@ -1,6 +1,86 @@
|
||||
PROMPT='%{$fg[blue]%}%B%20~%b%{$reset_color%}%{$(git_prompt_info)%} $ '
|
||||
PROMPT='%{$fg[blue]%}%n%{$reset_color%} on %{$fg[red]%}%M%{$reset_color%} in %{$fg[blue]%}%~%b%{$reset_color%}$(git_time_since_commit)$(check_git_prompt_info)
|
||||
$ '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="*%{$reset_color%}"
|
||||
|
||||
# Text to display if the branch is dirty
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
||||
|
||||
# Text to display if the branch is clean
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# 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]%}"
|
||||
|
||||
|
||||
# Git sometimes goes into a detached head state. git_prompt_info doesn't
|
||||
# return anything in this case. So wrap it in another function and check
|
||||
# for an empty string.
|
||||
function check_git_prompt_info() {
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
if [[ -z $(git_prompt_info) ]]; then
|
||||
echo "%{$fg[magenta]%}detached-head%{$reset_color%})"
|
||||
else
|
||||
echo "$(git_prompt_info)"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# 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
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
|
||||
if [ $UID -eq 0 ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
|
||||
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="yellow"; fi
|
||||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="yellow"; fi
|
||||
|
||||
PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}'
|
||||
RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}'
|
||||
|
18
themes/awesomepanda.zsh-theme
Normal file
18
themes/awesomepanda.zsh-theme
Normal file
@ -0,0 +1,18 @@
|
||||
# the svn plugin has to be activated for this to work.
|
||||
|
||||
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}'
|
||||
|
||||
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]%}) "
|
||||
|
||||
|
||||
|
||||
ZSH_PROMPT_BASE_COLOR="%{$fg_bold[blue]%}"
|
||||
ZSH_THEME_REPO_NAME_COLOR="%{$fg_bold[red]%}"
|
||||
|
||||
ZSH_THEME_SVN_PROMPT_PREFIX="svn:("
|
||||
ZSH_THEME_SVN_PROMPT_SUFFIX=")"
|
||||
ZSH_THEME_SVN_PROMPT_DIRTY="%{$fg[red]%} ✘ %{$reset_color%}"
|
||||
ZSH_THEME_SVN_PROMPT_CLEAN=" "
|
14
themes/bira.zsh-theme
Normal file
14
themes/bira.zsh-theme
Normal file
@ -0,0 +1,14 @@
|
||||
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
|
||||
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
|
||||
local rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
|
||||
local git_branch='$(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
|
||||
╰─%B$%b "
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
@ -1,4 +1,4 @@
|
||||
if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="white"; fi
|
||||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="white"; fi
|
||||
|
||||
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
|
||||
RPROMPT='[%*]'
|
||||
|
6
themes/cloud.zsh-theme
Normal file
6
themes/cloud.zsh-theme
Normal file
@ -0,0 +1,6 @@
|
||||
PROMPT='%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]"
|
56
themes/dieter.zsh-theme
Normal file
56
themes/dieter.zsh-theme
Normal file
@ -0,0 +1,56 @@
|
||||
# the idea of this theme is to contain a lot of info in a small string, by
|
||||
# compressing some parts and colorcoding, which bring useful visual cues,
|
||||
# while limiting the amount of colors and such to keep it easy on the eyes.
|
||||
# When a command exited >0, the timestamp will be in red and the exit code
|
||||
# will be on the right edge.
|
||||
# The exit code visual cues will only display once.
|
||||
# (i.e. they will be reset, even if you hit enter a few times on empty command prompts)
|
||||
|
||||
typeset -A host_repr
|
||||
|
||||
# translate hostnames into shortened, colorcoded strings
|
||||
host_repr=('dieter-ws-a7n8x-arch' "%{$fg_bold[green]%}ws" 'dieter-p4sci-arch' "%{$fg_bold[blue]%}p4")
|
||||
|
||||
# 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
|
||||
|
||||
# user part, color coded by privileges
|
||||
local user="%(!.%{$fg[blue]%}.%{$fg[blue]%})%n%{$reset_color%}"
|
||||
|
||||
# Hostname part. compressed and colorcoded per host_repr array
|
||||
# if not found, regular hostname in default color
|
||||
local host="@${host_repr[$(hostname)]:-$(hostname)}%{$reset_color%}"
|
||||
|
||||
# Compacted $PWD
|
||||
local pwd="%{$fg[blue]%}%c%{$reset_color%}"
|
||||
|
||||
PROMPT='${time} ${user}${host} ${pwd} $(git_prompt_info)'
|
||||
|
||||
# i would prefer 1 icon that shows the "most drastic" deviation from HEAD,
|
||||
# but lets see how this works out
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}?%{$fg[green]%}%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}"
|
||||
|
||||
# elaborate exitcode on the right when >0
|
||||
return_code_enabled="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
return_code_disabled=
|
||||
return_code=$return_code_enabled
|
||||
|
||||
RPS1='${return_code}'
|
||||
|
||||
function accept-line-or-clear-warning () {
|
||||
if [[ -z $BUFFER ]]; then
|
||||
time=$time_disabled
|
||||
return_code=$return_code_disabled
|
||||
else
|
||||
time=$time_enabled
|
||||
return_code=$return_code_enabled
|
||||
fi
|
||||
zle accept-line
|
||||
}
|
||||
zle -N accept-line-or-clear-warning
|
||||
bindkey '^M' accept-line-or-clear-warning
|
85
themes/dogenpunk.zsh-theme
Normal file
85
themes/dogenpunk.zsh-theme
Normal file
@ -0,0 +1,85 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# FILE: dogenpunk.zsh-theme
|
||||
# DESCRIPTION: oh-my-zsh theme file.
|
||||
# AUTHOR: Matthew Nelson (dogenpunk@gmail.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%}"
|
||||
|
||||
PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ओम् %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info)
|
||||
%{$fg[red]%}%!%{$reset_color%} $(prompt_char) '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}git%{$reset_color%}@%{$bg[white]%}%{$fg[black]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
RPROMPT='${return_status}$(git_prompt_status)%{$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]%} ✭"
|
||||
|
||||
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
|
||||
}
|
@ -5,7 +5,7 @@ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
function prompt_char {
|
||||
if [ "$(whoami)" = "root" ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
|
||||
if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
|
||||
}
|
||||
|
||||
PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
|
||||
|
9
themes/fishy.zsh-theme
Normal file
9
themes/fishy.zsh-theme
Normal file
@ -0,0 +1,9 @@
|
||||
# ZSH Theme emulating the Fish shell's default prompt.
|
||||
|
||||
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%}"
|
19
themes/flazz.zsh-theme
Normal file
19
themes/flazz.zsh-theme
Normal file
@ -0,0 +1,19 @@
|
||||
if [ "$(whoami)" = "root" ]
|
||||
then CARETCOLOR="red"
|
||||
else CARETCOLOR="blue"
|
||||
fi
|
||||
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%m%{${fg_bold[magenta]}%} :: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}%#%{${reset_color}%} '
|
||||
|
||||
RPS1='$(vi_mode_prompt_info) ${return_code}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
|
||||
|
||||
MODE_INDICATOR="%{$fg_bold[magenta]%}<%{$reset_color%}%{$fg[magenta]%}<<%{$reset_color%}"
|
||||
|
||||
# TODO use 265 colors
|
||||
#MODE_INDICATOR="$FX[bold]$FG[020]<$FX[no_bold]%{$fg[blue]%}<<%{$reset_color%}"
|
||||
# TODO use two lines if git
|
10
themes/frisk.zsh-theme
Normal file
10
themes/frisk.zsh-theme
Normal file
@ -0,0 +1,10 @@
|
||||
PROMPT=$'
|
||||
%{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%}
|
||||
%{$fg_bold[black]%}>%{$reset_color%} '
|
||||
|
||||
PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
19
themes/gallois.zsh-theme
Normal file
19
themes/gallois.zsh-theme
Normal file
@ -0,0 +1,19 @@
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
|
||||
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 "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
||||
#RVM and git settings
|
||||
if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
||||
RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1'
|
||||
fi
|
||||
|
||||
PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '
|
4
themes/gentoo.zsh-theme
Normal file
4
themes/gentoo.zsh-theme
Normal file
@ -0,0 +1,4 @@
|
||||
PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%#%{$reset_color%} '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=") "
|
15
themes/gozilla.zsh-theme
Normal file
15
themes/gozilla.zsh-theme
Normal file
@ -0,0 +1,15 @@
|
||||
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
RPROMPT='$(git_prompt_status)%{$reset_color%}'
|
||||
|
||||
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]%} ✂"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱"
|
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%}"
|
137
themes/jonathan.zsh-theme
Normal file
137
themes/jonathan.zsh-theme
Normal file
@ -0,0 +1,137 @@
|
||||
function precmd {
|
||||
local TERMWIDTH
|
||||
(( TERMWIDTH = ${COLUMNS} - 1 ))
|
||||
|
||||
|
||||
###
|
||||
# Truncate the path if it's too long.
|
||||
|
||||
PR_FILLBAR=""
|
||||
PR_PWDLEN=""
|
||||
|
||||
local promptsize=${#${(%):---(%n@%m:%l)---()--}}
|
||||
local rubyprompt=`rvm_prompt_info`
|
||||
local rubypromptsize=${#${rubyprompt}}
|
||||
local pwdsize=${#${(%):-%~}}
|
||||
|
||||
if [[ "$promptsize + $rubypromptsize + $pwdsize" -gt $TERMWIDTH ]]; then
|
||||
((PR_PWDLEN=$TERMWIDTH - $promptsize))
|
||||
else
|
||||
PR_FILLBAR="\${(l.(($TERMWIDTH - ($promptsize + $rubypromptsize + $pwdsize)))..${PR_HBAR}.)}"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
setopt extended_glob
|
||||
preexec () {
|
||||
if [[ "$TERM" == "screen" ]]; then
|
||||
local CMD=${1[(wr)^(*=*|sudo|-*)]}
|
||||
echo -n "\ek$CMD\e\\"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
setprompt () {
|
||||
###
|
||||
# Need this so the prompt will work.
|
||||
|
||||
setopt prompt_subst
|
||||
|
||||
|
||||
###
|
||||
# See if we can use colors.
|
||||
|
||||
autoload colors zsh/terminfo
|
||||
if [[ "$terminfo[colors]" -ge 8 ]]; then
|
||||
colors
|
||||
fi
|
||||
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
|
||||
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
|
||||
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
|
||||
(( count = $count + 1 ))
|
||||
done
|
||||
PR_NO_COLOUR="%{$terminfo[sgr0]%}"
|
||||
|
||||
###
|
||||
# Modify Git prompt
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$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]%} ✭"
|
||||
|
||||
###
|
||||
# See if we can use extended characters to look nicer.
|
||||
|
||||
typeset -A altchar
|
||||
set -A altchar ${(s..)terminfo[acsc]}
|
||||
PR_SET_CHARSET="%{$terminfo[enacs]%}"
|
||||
PR_SHIFT_IN="%{$terminfo[smacs]%}"
|
||||
PR_SHIFT_OUT="%{$terminfo[rmacs]%}"
|
||||
PR_HBAR=${altchar[q]:--}
|
||||
PR_ULCORNER=${altchar[l]:--}
|
||||
PR_LLCORNER=${altchar[m]:--}
|
||||
PR_LRCORNER=${altchar[j]:--}
|
||||
PR_URCORNER=${altchar[k]:--}
|
||||
|
||||
|
||||
###
|
||||
# Decide if we need to set titlebar text.
|
||||
|
||||
case $TERM in
|
||||
xterm*)
|
||||
PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}'
|
||||
;;
|
||||
screen)
|
||||
PR_TITLEBAR=$'%{\e_screen \005 (\005t) | %(!.-=[ROOT]=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\e\\%}'
|
||||
;;
|
||||
*)
|
||||
PR_TITLEBAR=''
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
###
|
||||
# Decide whether to set a screen title
|
||||
if [[ "$TERM" == "screen" ]]; then
|
||||
PR_STITLE=$'%{\ekzsh\e\\%}'
|
||||
else
|
||||
PR_STITLE=''
|
||||
fi
|
||||
|
||||
|
||||
###
|
||||
# Finally, the prompt.
|
||||
|
||||
PROMPT='$PR_SET_CHARSET$PR_STITLE${(e)PR_TITLEBAR}\
|
||||
$PR_CYAN$PR_SHIFT_IN$PR_ULCORNER$PR_HBAR$PR_SHIFT_OUT$PR_GREY(\
|
||||
$PR_GREEN%$PR_PWDLEN<...<%~%<<\
|
||||
$PR_GREY)`rvm_prompt_info`$PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_HBAR${(e)PR_FILLBAR}$PR_HBAR$PR_SHIFT_OUT$PR_GREY(\
|
||||
$PR_CYAN%(!.%SROOT%s.%n)$PR_GREY@$PR_GREEN%m:%l\
|
||||
$PR_GREY)$PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_URCORNER$PR_SHIFT_OUT\
|
||||
|
||||
$PR_CYAN$PR_SHIFT_IN$PR_LLCORNER$PR_BLUE$PR_HBAR$PR_SHIFT_OUT(\
|
||||
$PR_YELLOW%D{%H:%M:%S}\
|
||||
$PR_LIGHT_BLUE%{$reset_color%}`git_prompt_info``git_prompt_status`$PR_BLUE)$PR_CYAN$PR_SHIFT_IN$PR_HBAR\
|
||||
$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\
|
||||
>$PR_NO_COLOUR '
|
||||
|
||||
# display exitcode on the right when >0
|
||||
return_code="%(?..%{$fg[red]%}%? ↵ %{$reset_color%})"
|
||||
RPROMPT=' $return_code$PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_BLUE$PR_HBAR$PR_SHIFT_OUT\
|
||||
($PR_YELLOW%D{%a,%b%d}$PR_BLUE)$PR_SHIFT_IN$PR_HBAR$PR_CYAN$PR_LRCORNER$PR_SHIFT_OUT$PR_NO_COLOUR'
|
||||
|
||||
PS2='$PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\
|
||||
$PR_BLUE$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT(\
|
||||
$PR_LIGHT_GREEN%_$PR_BLUE)$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\
|
||||
$PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT$PR_NO_COLOUR '
|
||||
}
|
||||
|
||||
setprompt
|
@ -1,6 +1,6 @@
|
||||
# ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png
|
||||
|
||||
if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \
|
||||
|
8
themes/jtriley.zsh-theme
Normal file
8
themes/jtriley.zsh-theme
Normal file
@ -0,0 +1,8 @@
|
||||
#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]%}%% %{$reset_color%}"
|
||||
|
||||
#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]%})"
|
46
themes/juanghurtado.zsh-theme
Normal file
46
themes/juanghurtado.zsh-theme
Normal file
@ -0,0 +1,46 @@
|
||||
# ------------------------------------------------------------------------
|
||||
# Juan G. Hurtado oh-my-zsh theme
|
||||
# (Needs Git plugin for current_branch method)
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Color shortcuts
|
||||
RED=$fg[red]
|
||||
YELLOW=$fg[yellow]
|
||||
GREEN=$fg[green]
|
||||
WHITE=$fg[white]
|
||||
BLUE=$fg[blue]
|
||||
RED_BOLD=$fg_bold[red]
|
||||
YELLOW_BOLD=$fg_bold[yellow]
|
||||
GREEN_BOLD=$fg_bold[green]
|
||||
WHITE_BOLD=$fg_bold[white]
|
||||
BLUE_BOLD=$fg_bold[blue]
|
||||
RESET_COLOR=$reset_color
|
||||
|
||||
# Format for git_prompt_info()
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
|
||||
# Format for parse_git_dirty()
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RED%}(*)"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# Format for git_prompt_status()
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED%}unmerged"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED=" %{$RED%}deleted"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW%}renamed"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$YELLOW%}modified"
|
||||
ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}added"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$WHITE%}untracked"
|
||||
|
||||
# Format for git_prompt_ahead()
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)"
|
||||
|
||||
# Format for git_prompt_long_sha() and git_prompt_short_sha()
|
||||
ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$WHITE%}[%{$YELLOW%}"
|
||||
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
|
||||
|
||||
# Prompt format
|
||||
PROMPT='
|
||||
%{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
|
||||
%{$BLUE%}>%{$RESET_COLOR%} '
|
||||
RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'
|
12
themes/kardan.zsh-theme
Normal file
12
themes/kardan.zsh-theme
Normal file
@ -0,0 +1,12 @@
|
||||
# Simple theme based on my old zsh settings.
|
||||
|
||||
function get_host {
|
||||
echo '@'`hostname`''
|
||||
}
|
||||
|
||||
PROMPT='> '
|
||||
RPROMPT='%~$(git_prompt_info)$(get_host)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
|
21
themes/kolo.zsh-theme
Normal file
21
themes/kolo.zsh-theme
Normal file
@ -0,0 +1,21 @@
|
||||
autoload -U colors && colors
|
||||
|
||||
autoload -Uz vcs_info
|
||||
|
||||
zstyle ':vcs_info:*' stagedstr '%F{green}●'
|
||||
zstyle ':vcs_info:*' unstagedstr '%F{yellow}●'
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r'
|
||||
zstyle ':vcs_info:*' enable git svn
|
||||
precmd () {
|
||||
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
|
||||
zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{green}]'
|
||||
} else {
|
||||
zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{red}●%F{green}]'
|
||||
}
|
||||
|
||||
vcs_info
|
||||
}
|
||||
|
||||
setopt prompt_subst
|
||||
PROMPT='%B%F{magenta}%c%B%F{green}${vcs_info_msg_0_}%B%F{magenta} %{$reset_color%}%% '
|
50
themes/kphoen.zsh-theme
Normal file
50
themes/kphoen.zsh-theme
Normal file
@ -0,0 +1,50 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# FILE: kphoen.zsh-theme
|
||||
# DESCRIPTION: oh-my-zsh theme file.
|
||||
# AUTHOR: Kévin Gomez (geek63@gmail.com)
|
||||
# VERSION: 1.0.0
|
||||
# SCREENSHOT:
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
|
||||
PROMPT='[%{$fg[red]%}%n%{$reset_color%}@%{$fg[magenta]%}%m%{$reset_color%}:%{$fg[blue]%}%~%{$reset_color%}$(git_prompt_info)]
|
||||
%# '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# display exitcode on the right when >0
|
||||
return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
RPROMPT='${return_code}$(git_prompt_status)%{$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]%} ✭"
|
||||
else
|
||||
PROMPT='[%n@%m:%~$(git_prompt_info)]
|
||||
%# '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
# display exitcode on the right when >0
|
||||
return_code="%(?..%? ↵)"
|
||||
|
||||
RPROMPT='${return_code}$(git_prompt_status)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED=" ✚"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED=" ✹"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED=" ✖"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED=" ➜"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED=" ═"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED=" ✭"
|
||||
fi
|
6
themes/lambda.zsh-theme
Normal file
6
themes/lambda.zsh-theme
Normal file
@ -0,0 +1,6 @@
|
||||
# ZSH Theme - Preview: http://cl.ly/350F0F0k1M2y3A2i3p1S
|
||||
|
||||
PROMPT='λ %~/ $(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
14
themes/murilasso.zsh-theme
Normal file
14
themes/murilasso.zsh-theme
Normal file
@ -0,0 +1,14 @@
|
||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
|
||||
local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}'
|
||||
local rvm_ruby='%{$fg[red]%}$(rvm_prompt_info)%{$reset_color%}'
|
||||
local git_branch='%{$fg[blue]%}$(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
PROMPT="${user_host}:${current_dir} ${rvm_ruby}
|
||||
${git_branch} %B$%b "
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}"
|
30
themes/muse.zsh-theme
Normal file
30
themes/muse.zsh-theme
Normal file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env zsh
|
||||
#local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||
|
||||
setopt promptsubst
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
|
||||
PROMPT_SUCCESS_COLOR=$FG[117]
|
||||
PROMPT_FAILURE_COLOR=$FG[124]
|
||||
PROMPT_VCS_INFO_COLOR=$FG[242]
|
||||
PROMPT_PROMPT=$FG[077]
|
||||
GIT_DIRTY_COLOR=$FG[133]
|
||||
GIT_CLEAN_COLOR=$FG[118]
|
||||
GIT_PROMPT_INFO=$FG[012]
|
||||
|
||||
PROMPT='%{$PROMPT_SUCCESS_COLOR%}%~%{$reset_color%} %{$GIT_PROMPT_INFO%}$(git_prompt_info)%{$GIT_DIRTY_COLOR%}$(git_prompt_status) %{$reset_color%}%{$PROMPT_PROMPT%}ᐅ%{$reset_color%} '
|
||||
|
||||
#RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="("
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$GIT_PROMPT_INFO%})"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$GIT_DIRTY_COLOR%}✘"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$GIT_CLEAN_COLOR%}✔"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$FG[082]%}✚%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$FG[166]%}✹%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[160]%}✖%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[220]%}➜%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[082]%}═%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[190]%}✭%{$reset_color%}"
|
7
themes/nanotech.zsh-theme
Normal file
7
themes/nanotech.zsh-theme
Normal file
@ -0,0 +1,7 @@
|
||||
PROMPT='%F{green}%2c%F{blue} [%f '
|
||||
RPROMPT='$(git_prompt_info) %F{blue}] %F{green}%D{%L:%M} %F{yellow}%D{%p}%f'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%f"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %F{red}*%f"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
43
themes/nicoulaj.zsh-theme
Normal file
43
themes/nicoulaj.zsh-theme
Normal file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env zsh
|
||||
# ------------------------------------------------------------------------------
|
||||
# Prompt for the Zsh shell:
|
||||
# * One line.
|
||||
# * VCS info on the right prompt.
|
||||
# * Only shows the path on the left prompt by default.
|
||||
# * Crops the path to a defined length and only shows the path relative to
|
||||
# the current VCS repository root.
|
||||
# * Wears a different color wether the last command succeeded/failed.
|
||||
# * Shows user@hostname if connected through SSH.
|
||||
# * Shows if logged in as root or not.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Customizable parameters.
|
||||
PROMPT_PATH_MAX_LENGTH=30
|
||||
PROMPT_DEFAULT_END=❯
|
||||
PROMPT_ROOT_END=❯❯❯
|
||||
PROMPT_SUCCESS_COLOR=$FG[071]
|
||||
PROMPT_FAILURE_COLOR=$FG[124]
|
||||
PROMPT_VCS_INFO_COLOR=$FG[242]
|
||||
|
||||
# Set required options.
|
||||
setopt promptsubst
|
||||
|
||||
# Load required modules.
|
||||
autoload -U add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
# Add hook for calling vcs_info before each command.
|
||||
add-zsh-hook precmd vcs_info
|
||||
|
||||
# Set vcs_info parameters.
|
||||
zstyle ':vcs_info:*' enable hg bzr git
|
||||
zstyle ':vcs_info:*:*' check-for-changes true # Can be slow on big repos.
|
||||
zstyle ':vcs_info:*:*' unstagedstr '!'
|
||||
zstyle ':vcs_info:*:*' stagedstr '+'
|
||||
zstyle ':vcs_info:*:*' actionformats "%S" "%r/%s/%b %u%c (%a)"
|
||||
zstyle ':vcs_info:*:*' formats "%S" "%r/%s/%b %u%c"
|
||||
zstyle ':vcs_info:*:*' nvcsformats "%~" ""
|
||||
|
||||
# Define prompts.
|
||||
PROMPT="%(0?.%{$PROMPT_SUCCESS_COLOR%}.%{$PROMPT_FAILURE_COLOR%})${SSH_TTY:+[%n@%m]}%{$FX[bold]%}%$PROMPT_PATH_MAX_LENGTH<..<"'${vcs_info_msg_0_%%.}'"%<<%(!.$PROMPT_ROOT_END.$PROMPT_DEFAULT_END)%{$FX[no-bold]%}%{$FX[reset]%} "
|
||||
RPROMPT="%{$PROMPT_VCS_INFO_COLOR%}"'$vcs_info_msg_1_'"%{$FX[reset]%}"
|
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%}"
|
||||
|
14
themes/philips.zsh-theme
Normal file
14
themes/philips.zsh-theme
Normal file
@ -0,0 +1,14 @@
|
||||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||
|
||||
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
|
||||
RPROMPT='[%*]'
|
||||
|
||||
# git theming
|
||||
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]%}"
|
||||
|
||||
# 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:'
|
@ -1,4 +1,4 @@
|
||||
if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||
|
||||
PROMPT='
|
||||
%{$fg[$NCOLOR]%}%B%n@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%}
|
||||
|
24
themes/rixius.zsh-theme
Normal file
24
themes/rixius.zsh-theme
Normal file
@ -0,0 +1,24 @@
|
||||
# /|/ Code by Stephen
|
||||
# /|/ "Rixius" Middleton
|
||||
#
|
||||
# name in folder (github)
|
||||
# ± if in github repo, or ≥ if otherwise Time in 24-hour format is on right.
|
||||
function collapse_pwd {
|
||||
echo $(pwd | sed -e "s,^$HOME,~,")
|
||||
}
|
||||
function prompt_char {
|
||||
echo -n "%{$bg[white]%}%{$fg[red]%}"
|
||||
git branch >/dev/null 2>/dev/null && echo "±%{$reset_color%}" && return
|
||||
echo "≥%{$reset_color%}"
|
||||
}
|
||||
RIXIUS_PRE="%{$bg[white]%}%{$fg[red]%}"
|
||||
|
||||
PROMPT='
|
||||
%{$RIXIUS_PRE%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info)
|
||||
$(prompt_char) '
|
||||
RPROMPT='%{$RIXIUS_PRE%}%T%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RIXIUS_PRE%}!%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$RIXIUS_PRE%}√%{$reset_color%}"
|
48
themes/sorin.zsh-theme
Normal file
48
themes/sorin.zsh-theme
Normal file
@ -0,0 +1,48 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# FILE: sorin.zsh-theme
|
||||
# DESCRIPTION: oh-my-zsh theme file.
|
||||
# AUTHOR: Sorin Ionescu (sorin.ionescu@gmail.com)
|
||||
# VERSION: 1.0.2
|
||||
# SCREENSHOT: http://i.imgur.com/aipDQ.png
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
|
||||
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
|
||||
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
|
||||
|
||||
PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%}❯)%{$reset_color%} '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
RPROMPT='${return_status}$(git_prompt_status)%{$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]%} ✭"
|
||||
else
|
||||
MODE_INDICATOR="❮❮❮"
|
||||
local return_status="%(?::⏎)"
|
||||
|
||||
PROMPT='%c$(git_prompt_info) %(!.#.❯) '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" git:"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
RPROMPT='${return_status}$(git_prompt_status)'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED=" ✚"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED=" ✹"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED=" ✖"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED=" ➜"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED=" ═"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED=" ✭"
|
||||
fi
|
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)$ '
|
@ -1,6 +1,16 @@
|
||||
# Comment
|
||||
# Comment
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=' (git:'
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX=')'
|
||||
PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}'
|
||||
|
||||
PROMPT='%{$fg[magenta]%}[%c]$(git_prompt_info) $ %{$reset_color%}'
|
||||
RPROMPT='%{$fg[magenta]%}$(git_prompt_info)%{$reset_color%} $(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[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]%} ✂"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱"
|
15
themes/tjkirch.zsh-theme
Normal file
15
themes/tjkirch.zsh-theme
Normal file
@ -0,0 +1,15 @@
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
function prompt_char {
|
||||
if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
|
||||
}
|
||||
|
||||
PROMPT='%(?, ,%{$fg[red]%}FAIL: $?%{$reset_color%}
|
||||
)
|
||||
%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)
|
||||
%_$(prompt_char) '
|
||||
|
||||
RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
|
Reference in New Issue
Block a user