summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/adben.zsh-theme2
-rw-r--r--themes/agnoster.zsh-theme32
-rw-r--r--themes/amuse.zsh-theme12
-rw-r--r--themes/avit.zsh-theme53
-rw-r--r--themes/awesomepanda.zsh-theme8
-rw-r--r--themes/candy-kingdom.zsh-theme2
-rw-r--r--themes/cypher.zsh-theme2
-rw-r--r--themes/dogenpunk.zsh-theme2
-rw-r--r--themes/emotty.zsh-theme99
-rw-r--r--themes/fino-time.zsh-theme2
-rw-r--r--themes/fino.zsh-theme2
-rw-r--r--themes/gnzh.zsh-theme57
-rw-r--r--themes/jispwoso.zsh-theme10
-rw-r--r--themes/michelebologna.zsh-theme115
-rw-r--r--themes/minimal.zsh-theme12
-rw-r--r--themes/rkj-repos.zsh-theme4
-rw-r--r--themes/steeef.zsh-theme18
-rw-r--r--themes/strug.zsh-theme25
-rw-r--r--themes/trapd00r.zsh-theme2
-rw-r--r--themes/ys.zsh-theme33
20 files changed, 354 insertions, 138 deletions
diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme
index 212b823a5..e4774cf0e 100644
--- a/themes/adben.zsh-theme
+++ b/themes/adben.zsh-theme
@@ -42,7 +42,7 @@ GREEN_BASE_START="${PR_RESET}${PR_GREY}>${PR_RESET}${PR_GREEN}>${PR_BRIGHT_GREEN
GREEN_START_P1="${PR_RESET}${GREEN_BASE_START}${PR_RESET} "
DIVISION="${PR_RESET}${PR_RED} < ${PR_RESET}"
VCS_DIRTY_COLOR="${PR_RESET}${PR_YELLOW}"
-Vcs_CLEAN_COLOR="${PR_RESET}${PR_GREEN}"
+VCS_CLEAN_COLOR="${PR_RESET}${PR_GREEN}"
VCS_SUFIX_COLOR="${PR_RESET}${PR_RED}› ${PR_RESET}"
# ########## COLOR ###########
# ########## SVN ###########
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 8c7be6e01..e54346acf 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -7,6 +7,9 @@
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
+# Make sure you have a recent version: the code points that Powerline
+# uses changed in 2012, and older versions will display incorrectly,
+# in confusing ways.
#
# In addition, I recommend the
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
@@ -26,7 +29,22 @@
# A few utility functions to make it easy and re-usable to draw segmented prompts
CURRENT_BG='NONE'
-SEGMENT_SEPARATOR=''
+
+# Special Powerline characters
+
+() {
+ local LC_ALL="" LC_CTYPE="en_US.UTF-8"
+ # NOTE: This segment separator character is correct. In 2012, Powerline changed
+ # the code points they use for their special characters. This is the new code point.
+ # If this is not working for you, you probably have an old version of the
+ # Powerline-patched fonts installed. Download and install the new version.
+ # Do not submit PRs to change this unless you have reviewed the Powerline code point
+ # history and have new information.
+ # This is defined using a Unicode escape sequence so it is unambiguously readable, regardless of
+ # what font the user is viewing this source code in. Do not replace the
+ # escape sequence with a single literal character.
+ SEGMENT_SEPARATOR=$'\ue0b0' # 
+}
# Begin a segment
# Takes two arguments, background and foreground. Both can be omitted,
@@ -67,12 +85,18 @@ prompt_context() {
# Git: branch/detached head, dirty status
prompt_git() {
+
+ local PL_BRANCH_CHAR
+ () {
+ local LC_ALL="" LC_CTYPE="en_US.UTF-8"
+ PL_BRANCH_CHAR=$'\ue0a0' # 
+ }
local ref dirty mode repo_path
repo_path=$(git rev-parse --git-dir 2>/dev/null)
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
dirty=$(parse_git_dirty)
- ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
+ ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"
if [[ -n $dirty ]]; then
prompt_segment yellow black
else
@@ -98,7 +122,7 @@ prompt_git() {
zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats ' %u%c'
vcs_info
- echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_%% }${mode}"
+ echo -n "${ref/refs\/heads\//$PL_BRANCH_CHAR }${vcs_info_msg_0_%% }${mode}"
fi
}
@@ -126,7 +150,7 @@ prompt_hg() {
if `hg st | grep -q "^\?"`; then
prompt_segment red black
st='±'
- elif `hg st | grep -q "^(M|A)"`; then
+ elif `hg st | grep -q "^[MA]"`; then
prompt_segment yellow black
st='±'
else
diff --git a/themes/amuse.zsh-theme b/themes/amuse.zsh-theme
index 548f6d39d..4e7361ced 100644
--- a/themes/amuse.zsh-theme
+++ b/themes/amuse.zsh-theme
@@ -12,10 +12,18 @@ PROMPT='
%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%}
$ '
-ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}⭠ "
+# Must use Powerline font, for \uE0A0 to render.
+ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}\uE0A0 "
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
ZSH_THEME_GIT_PROMPT_CLEAN=""
-RPROMPT='%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}'
+if [ -e ~/.rvm/bin/rvm-prompt ]; then
+ RPROMPT='%{$fg_bold[red]%}‹$(rvm_current)›%{$reset_color%}'
+else
+ if which rbenv &> /dev/null; then
+ RPROMPT='%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}'
+ fi
+fi
+
diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme
index a21a9c8c4..65466b82f 100644
--- a/themes/avit.zsh-theme
+++ b/themes/avit.zsh-theme
@@ -38,34 +38,32 @@ function _ruby_version() {
# 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 [ $hours -gt 24 ]; then
- commit_age="${days}d"
- elif [ $minutes -gt 60 ]; then
- commit_age="${sub_hours}h${sub_minutes}m"
- else
- commit_age="${minutes}m"
- fi
-
- color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL
- echo "$color$commit_age%{$reset_color%}"
+# Only proceed if there is actually a commit.
+ if git log -1 > /dev/null 2>&1; 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 [ $hours -gt 24 ]; then
+ commit_age="${days}d"
+ elif [ $minutes -gt 60 ]; then
+ commit_age="${sub_hours}h${sub_minutes}m"
+ else
+ commit_age="${minutes}m"
fi
+
+ color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL
+ echo "$color$commit_age%{$reset_color%}"
fi
}
@@ -99,4 +97,3 @@ ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[grey]%}"
export LSCOLORS="exfxcxdxbxegedabagacad"
export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
export GREP_COLOR='1;33'
-
diff --git a/themes/awesomepanda.zsh-theme b/themes/awesomepanda.zsh-theme
index 411b89837..1c5d06b2d 100644
--- a/themes/awesomepanda.zsh-theme
+++ b/themes/awesomepanda.zsh-theme
@@ -1,18 +1,16 @@
# 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%}'
+local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
+PROMPT='${ret_status}%{$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=" " \ No newline at end of file
+ZSH_THEME_SVN_PROMPT_CLEAN=" "
diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme
index 889128758..9d2103926 100644
--- a/themes/candy-kingdom.zsh-theme
+++ b/themes/candy-kingdom.zsh-theme
@@ -13,7 +13,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
}
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
+ [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
}
PROMPT='
diff --git a/themes/cypher.zsh-theme b/themes/cypher.zsh-theme
index 45df53d22..6e6b78ee6 100644
--- a/themes/cypher.zsh-theme
+++ b/themes/cypher.zsh-theme
@@ -1,4 +1,4 @@
# Based on evan's prompt
# Shows the exit status of the last command if non-zero
# Uses "#" instead of "»" when running with elevated privileges
-PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . ${fg[red]}%? )%{${fg[blue]}%}»%{${reset_color}%} "
+PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . %{${fg[red]}%}%? )%{${fg[blue]}%}»%{${reset_color}%} "
diff --git a/themes/dogenpunk.zsh-theme b/themes/dogenpunk.zsh-theme
index 0bd38acc2..d6719281d 100644
--- a/themes/dogenpunk.zsh-theme
+++ b/themes/dogenpunk.zsh-theme
@@ -3,7 +3,7 @@
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)
+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]%}"
diff --git a/themes/emotty.zsh-theme b/themes/emotty.zsh-theme
new file mode 100644
index 000000000..34d491ff0
--- /dev/null
+++ b/themes/emotty.zsh-theme
@@ -0,0 +1,99 @@
+#!/usr/bin/env zsh
+# ------------------------------------------------------------------------------
+# FILE: emotty.zsh-theme
+# DESCRIPTION: A varying emoji based theme
+# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net)
+# VERSION: 1.0.0
+# DEPENDS: emotty plugin
+# RECOMMENDS: Hasklig font
+#
+# This theme shows a different emoji for each tty at the main prompt.
+#
+# There are pre-defined different emoji sets to choose from, e.g.:
+# emoji, stellar, floral, zodiac, love (see emotty plugin).
+#
+# To choose a different emotty set than the default (emoji)
+# % export emotty_set=nature
+#
+# For the superuser (root) this theme shows a designated indicator
+# and switches the foreground color to red
+# (see root_prompt variable, default: skull).
+# But you are using sudo (8) instead of designated a root shell, right‽
+#
+# When logged in via SSH the main prompt also shows the user- and hostname.
+#
+# The exit status of the last failed command is displayed in the window title
+# along with an indicator (see warn_glyph variable, default: collision symbol).
+# To clear it just run: $NULL, true or :
+#
+# The right prompt shows the current working directory (3 levels up) in cyan.
+#
+# When in a git repository the main prompt shows the current branch name
+# with a branch indicator in yellow
+# (see vcs_branch_glyph variable, default: Hasklig branch glyph).
+#
+# If there are modified files the prompt switches to red and shows an unstaged
+# indicator (see vcs_unstaged_glyph variable, default: circled letter M).
+#
+# If there are staged files the prompt switches to green and shows an staged
+# indicator (see vcs_staged_glyph variable, default: high voltage sign).
+#
+# In a git repository the right prompt shows the repository name in bold and
+# prepends the current working directory subpath within the repository.
+#
+# When git currently performs an action such as merge or rebase, the action is
+# displayed in red instead of the branch name and a special action indicator
+# is shown (see vcs_action_glyph variable, default: chevron).
+# ------------------------------------------------------------------------------
+
+user_prompt="$(emotty)"
+root_prompt="$emoji[skull]"
+warn_prompt="$emoji[collision_symbol]"
+
+vcs_unstaged_glyph="%{$emoji[circled_latin_capital_letter_m]$emoji2[emoji_style] %2G%}"
+vcs_staged_glyph="%{$emoji[high_voltage_sign] %2G%}"
+vcs_branch_glyph=$(print -P $'\Ue0a0') # 
+vcs_action_glyph=$(print -P $'\U276f') # ❯
+
+red="$FG[001]"
+yellow="$FG[003]"
+green="$FG[002]"
+cyan="$FG[014]"
+
+prompt_glyph="%{%(#.${root_prompt}.${user_prompt}) %2G%}"
+
+# Uncomment the next line if you also like to see the warn_prompt in the prompt on the right.
+#last_command_failed="%(?.. %F{red}%1{${warn_prompt} %1G%}%?%f)"
+
+
+setopt promptsubst
+
+autoload -U add-zsh-hook
+autoload -Uz vcs_info
+
+zstyle ':vcs_info:*' enable git #hg svn cvs
+zstyle ':vcs_info:*' get-revision false
+zstyle ':vcs_info:*' check-for-changes true
+zstyle ':vcs_info:git:*' unstagedstr "${red}${vcs_unstaged_glyph}"
+zstyle ':vcs_info:*' stagedstr "${green}${vcs_staged_glyph}"
+
+# %(K|F){color} set (back|fore)ground color
+# %(k|f) reset (back|fore)ground color
+zstyle ':vcs_info:*' max-exports 3
+zstyle ':vcs_info:*' nvcsformats "${prompt_glyph}" '%3~' ''
+zstyle ':vcs_info:*' formats "${yellow}%u%c%b${vcs_branch_glyph}%f" '%S|' "$FX[bold]%r$FX[no-bold]"
+zstyle ':vcs_info:*' actionformats "${red}%K{white}%a${vcs_action_glyph}%k%f" '%S|' "$FX[bold]%r$FX[no-bold]"
+
+red_if_root="%(!.%F{red}.)"
+sshuser_on_host="${SSH_TTY:+%(!.$red.$yellow)%n@%m$reset_color}"
+
+PROMPT='${sshuser_on_host}${vcs_info_msg_0_}${red_if_root} '
+RPROMPT='${cyan}${vcs_info_msg_1_##.|}${vcs_info_msg_2_}%f${last_command_failed}'
+
+emotty_title() {
+ title "${${?/[^0]*/$warn_prompt $?}/0/${prompt_glyph}}"
+}
+add-zsh-hook precmd emotty_title
+add-zsh-hook precmd vcs_info
+
+# vim:ft=zsh ts=2 sw=2 sts=2
diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme
index 67b6b6e08..9b1db3a08 100644
--- a/themes/fino-time.zsh-theme
+++ b/themes/fino-time.zsh-theme
@@ -21,7 +21,7 @@ function prompt_char {
}
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
+ [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
}
diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme
index 50d41e899..6eec097f5 100644
--- a/themes/fino.zsh-theme
+++ b/themes/fino.zsh-theme
@@ -17,7 +17,7 @@ function prompt_char {
}
function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
+ [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
}
local ruby_env=''
diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme
index ab154c1e5..04b0450a8 100644
--- a/themes/gnzh.zsh-theme
+++ b/themes/gnzh.zsh-theme
@@ -1,53 +1,50 @@
# ZSH Theme - Preview: http://dl.dropbox.com/u/4109351/pics/gnzh-zsh-theme.png
# Based on bira theme
-# load some modules
-autoload -U zsh/terminfo # Used in the colour alias below
setopt prompt_subst
-# make some aliases for the colours: (could use normal escape sequences too)
-for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
- eval PR_$color='%{$fg[${(L)color}]%}'
-done
-eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
-eval PR_BOLD="%{$terminfo[bold]%}"
+() {
+
+local PR_USER PR_USER_OP PR_PROMPT PR_HOST
# Check the UID
if [[ $UID -ne 0 ]]; then # normal user
- eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}'
- eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}'
- local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR'
+ PR_USER='%F{green}%n%f'
+ PR_USER_OP='%F{green}%#%f'
+ PR_PROMPT='%f➤ %f'
else # root
- eval PR_USER='${PR_RED}%n${PR_NO_COLOR}'
- eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
- local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
+ PR_USER='%F{red}%n%f'
+ PR_USER_OP='%F{red}%#%f'
+ PR_PROMPT='%F{red}➤ %f'
fi
# Check if we are on SSH or not
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
- eval PR_HOST='${PR_YELLOW}%M${PR_NO_COLOR}' #SSH
+ PR_HOST='%F{red}%M%f' # SSH
else
- eval PR_HOST='${PR_GREEN}%M${PR_NO_COLOR}' # no SSH
+ PR_HOST='%F{green}%M%f' # no SSH
fi
-local return_code="%(?..%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})"
-local user_host='${PR_USER}${PR_CYAN}@${PR_HOST}'
-local current_dir='%{$PR_BOLD$PR_BLUE%}%~%{$PR_NO_COLOR%}'
+local return_code="%(?..%F{red}%? ↵%f)"
+
+local user_host="${PR_USER}%F{cyan}@${PR_HOST}"
+local current_dir="%B%F{blue}%~%f%b"
local rvm_ruby=''
-if ${HOME}/.rvm/bin/rvm-prompt &> /dev/null; then # detect local user rvm installation
- rvm_ruby='%{$PR_RED%}‹$(${HOME}/.rvm/bin/rvm-prompt i v g s)›%{$PR_NO_COLOR%}'
-elif which rvm-prompt &> /dev/null; then # detect sysem-wide rvm installation
- rvm_ruby='%{$PR_RED%}‹$(rvm-prompt i v g s)›%{$PR_NO_COLOR%}'
-elif which rbenv &> /dev/null; then # detect Simple Ruby Version management
- rvm_ruby='%{$PR_RED%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$PR_NO_COLOR%}'
+if ${HOME}/.rvm/bin/rvm-prompt &> /dev/null; then # detect user-local rvm installation
+ rvm_ruby='%F{red}‹$(${HOME}/.rvm/bin/rvm-prompt i v g s)›%f'
+elif which rvm-prompt &> /dev/null; then # detect system-wide rvm installation
+ rvm_ruby='%F{red}‹$(rvm-prompt i v g s)›%f'
+elif which rbenv &> /dev/null; then # detect Simple Ruby Version Management
+ rvm_ruby='%F{red}‹$(rbenv version | sed -e "s/ (set.*$//")›%f'
fi
-local git_branch='$(git_prompt_info)%{$PR_NO_COLOR%}'
+local git_branch='$(git_prompt_info)'
-#PROMPT="${user_host} ${current_dir} ${rvm_ruby} ${git_branch}$PR_PROMPT "
PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
╰─$PR_PROMPT "
-RPS1="${return_code}"
+RPROMPT="${return_code}"
+
+ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}‹"
+ZSH_THEME_GIT_PROMPT_SUFFIX="› %f"
-ZSH_THEME_GIT_PROMPT_PREFIX="%{$PR_YELLOW%}‹"
-ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$PR_NO_COLOR%}"
+}
diff --git a/themes/jispwoso.zsh-theme b/themes/jispwoso.zsh-theme
index cdfef3871..748430573 100644
--- a/themes/jispwoso.zsh-theme
+++ b/themes/jispwoso.zsh-theme
@@ -1,4 +1,10 @@
-PROMPT=$'%{$fg[green]%}%n@%m: %{$reset_color%}%{$fg[blue]%}%/%{$reset_color%}
-%{$fg_bold[red]%}➜ %{$reset_color%} '
+local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
+PROMPT=$'%{$fg[green]%}%n@%m: %{$reset_color%}%{$fg[blue]%}%/ %{$reset_color%}%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}
+${ret_status} %{$reset_color%} '
PROMPT2="%{$fg_blod[black]%}%_> %{$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]%})"
diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme
index a7599c8f5..110e3f203 100644
--- a/themes/michelebologna.zsh-theme
+++ b/themes/michelebologna.zsh-theme
@@ -1,44 +1,75 @@
-# reference colors
-GREEN="%{$fg_bold[green]%}"
-RED="%{$fg_bold[red]%}"
-CYAN="%{$fg_bold[cyan]%}"
-YELLOW="%{$fg_bold[yellow]%}"
-BLUE="%{$fg_bold[blue]%}"
-MAGENTA="%{$fg_bold[magenta]%}"
-WHITE="%{$fg_bold[white]%}"
-
-COLOR_ARRAY=($GREEN $RED $CYAN $YELLOW $BLUE $MAGENTA $WHITE)
-
-# color reset
-RESET_COLOR="%{$reset_color%}"
-
-# which color should be applied?
-USERNAME_NORMAL_COLOR=$WHITE
-USERNAME_ROOT_COLOR=$RED
-HOSTNAME_NORMAL_COLOR=$BLUE
-# uncomment next line if you want auto-generated hostname color
-#for i in $HOST; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]]
-HOSTNAME_ROOT_COLOR=$RED
-HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR)
-CURRENT_DIR_COLOR=$CYAN
-
-# zsh commands
-USERNAME_COMMAND="%n"
-HOSTNAME_COMMAND="%m"
-CURRENT_DIR="%~"
-
-# output: colors + commands
-USERNAME_OUTPUT="%(!..$USERNAME_NORMAL_COLOR$USERNAME_COMMAND$RESET_COLOR@)"
-HOSTNAME_OUTPUT="$HOSTNAME_COLOR$HOSTNAME_COMMAND$RESET_COLOR"
-CURRENT_DIR_OUTPUT="$CURRENT_DIR_COLOR$CURRENT_DIR"
-LAST_COMMAND_OUTPUT="%(?.%(!.$RED.$GREEN).$YELLOW)"
-
-# git theming
-ZSH_THEME_GIT_PROMPT_PREFIX="("
+# Michele Bologna's theme
+# http://michelebologna.net
+#
+# This a theme for oh-my-zsh. Features a colored prompt with:
+# * username@host: [jobs] [git] workdir %
+# * hostname color is based on hostname characters. When using as root, the
+# prompt shows only the hostname in red color.
+# * [jobs], if applicable, counts the number of suspended jobs tty
+# * [git], if applicable, represents the status of your git repo (more on that
+# later)
+# * '%' prompt will be green if last command return value is 0, yellow otherwise.
+#
+# git prompt is inspired by official git contrib prompt:
+# https://github.com/git/git/tree/master/contrib/completion/git-prompt.sh
+# and it adds:
+# * the current branch
+# * '%' if there are untracked files
+# * '$' if there are stashed changes
+# * '*' if there are modified files
+# * '+' if there are added files
+# * '<' if local repo is behind remote repo
+# * '>' if local repo is ahead remote repo
+# * '=' if local repo is equal to remote repo (in sync)
+# * '<>' if local repo is diverged
+
+local green="%{$fg_bold[green]%}"
+local red="%{$fg_bold[red]%}"
+local cyan="%{$fg_bold[cyan]%}"
+local yellow="%{$fg_bold[yellow]%}"
+local blue="%{$fg_bold[blue]%}"
+local magenta="%{$fg_bold[magenta]%}"
+local white="%{$fg_bold[white]%}"
+local reset="%{$reset_color%}"
+
+local -a color_array
+color_array=($green $red $cyan $yellow $blue $magenta $white)
+
+local username_normal_color=$white
+local username_root_color=$red
+local hostname_root_color=$red
+
+# calculating hostname color with hostname characters
+for i in `hostname`; local hostname_normal_color=$color_array[$[((#i))%7+1]]
+local -a hostname_color
+hostname_color=%(!.$hostname_root_color.$hostname_normal_color)
+
+local current_dir_color=$blue
+local username_command="%n"
+local hostname_command="%m"
+local current_dir="%~"
+
+local username_output="%(!..$username_normal_color$username_command$reset@)"
+local hostname_output="$hostname_color$hostname_command$reset"
+local current_dir_output="$current_dir_color$current_dir$reset"
+local jobs_bg="${red}fg: %j$reset"
+local last_command_output="%(?.%(!.$red.$green).$yellow)"
+
+ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
-ZSH_THEME_GIT_PROMPT_DIRTY=")$RED*"
-ZSH_THEME_GIT_PROMPT_CLEAN=")"
+ZSH_THEME_GIT_PROMPT_DIRTY=""
+ZSH_THEME_GIT_PROMPT_CLEAN=""
+ZSH_THEME_GIT_PROMPT_UNTRACKED="$blue%%"
+ZSH_THEME_GIT_PROMPT_MODIFIED="$red*"
+ZSH_THEME_GIT_PROMPT_ADDED="$green+"
+ZSH_THEME_GIT_PROMPT_STASHED="$blue$"
+ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="$green="
+ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">"
+ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<"
+ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="$red<>"
-# wrap all together
-PROMPT='$USERNAME_OUTPUT$HOSTNAME_OUTPUT:$CURRENT_DIR_OUTPUT $LAST_COMMAND_OUTPUT%#$RESET_COLOR '
-RPROMPT='%1(j.fg: [%j].) $GREEN$(git_prompt_info)$RESET_COLOR [%@]'
+PROMPT='$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)'
+GIT_PROMPT='$(out=$(git_prompt_info)$(git_prompt_status)$(git_remote_status);if [[ -n $out ]]; then printf %s " $white($green$out$white)$reset";fi)'
+PROMPT+="$GIT_PROMPT"
+PROMPT+=" $last_command_output%#$reset "
+RPROMPT=''
diff --git a/themes/minimal.zsh-theme b/themes/minimal.zsh-theme
index a2a16031f..e05df9c9b 100644
--- a/themes/minimal.zsh-theme
+++ b/themes/minimal.zsh-theme
@@ -1,18 +1,24 @@
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX=""
-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}]%{$reset_color%} "
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$fg[white]%}]%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} "
ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
+ZSH_THEME_HG_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
+ZSH_THEME_HG_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
+ZSH_THEME_HG_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
+ZSH_THEME_HG_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
vcs_status() {
- if [[ ( $(whence in_svn) != "" ) && ( $(in_svn) == 1 ) ]]; then
+ if [[ $(whence in_svn) != "" ]] && in_svn; then
svn_prompt_info
+ elif [[ $(whence in_hg) != "" ]] && in_hg; then
+ hg_prompt_info
else
git_prompt_info
fi
}
-PROMPT='%2~ $(vcs_status)»%b ' \ No newline at end of file
+PROMPT='%2~ $(vcs_status)»%b '
diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme
index 8585e66be..a3f1f3dfa 100644
--- a/themes/rkj-repos.zsh-theme
+++ b/themes/rkj-repos.zsh-theme
@@ -15,8 +15,8 @@ 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]%}✈"
-ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg[grey]%}"
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[blue]%}✈"
+ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg[blue]%}"
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}"
function mygit() {
diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme
index 13728ca9a..13dc3ad2f 100644
--- a/themes/steeef.zsh-theme
+++ b/themes/steeef.zsh-theme
@@ -10,7 +10,7 @@
export VIRTUAL_ENV_DISABLE_PROMPT=1
function virtualenv_info {
- [ $VIRTUAL_ENV ] && echo '('$fg[blue]`basename $VIRTUAL_ENV`%{$reset_color%}') '
+ [ $VIRTUAL_ENV ] && echo '('%F{blue}`basename $VIRTUAL_ENV`%f') '
}
PR_GIT_UPDATE=1
@@ -20,18 +20,18 @@ autoload -U add-zsh-hook
autoload -Uz vcs_info
#use extended color pallete if available
-if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
+if [[ $terminfo[colors] -ge 256 ]]; 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]"
+ turquoise="%F{cyan}"
+ orange="%F{yellow}"
+ purple="%F{magenta}"
+ hotpink="%F{red}"
+ limegreen="%F{green}"
fi
# enable VCS systems you use
@@ -48,7 +48,7 @@ zstyle ':vcs_info:*:prompt:*' check-for-changes true
# %a - action (e.g. rebase-i)
# %R - repository path
# %S - path in the repository
-PR_RST="%{${reset_color}%}"
+PR_RST="%f"
FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})"
FMT_ACTION="(%{$limegreen%}%a${PR_RST})"
FMT_UNSTAGED="%{$orange%}●"
@@ -96,5 +96,5 @@ function steeef_precmd {
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)%{$reset_color%}
+%{$purple%}%n${PR_RST} at %{$orange%}%m${PR_RST} in %{$limegreen%}%~${PR_RST} $vcs_info_msg_0_$(virtualenv_info)
$ '
diff --git a/themes/strug.zsh-theme b/themes/strug.zsh-theme
new file mode 100644
index 000000000..89b56b008
--- /dev/null
+++ b/themes/strug.zsh-theme
@@ -0,0 +1,25 @@
+# terminal coloring
+export CLICOLOR=1
+export LSCOLORS=dxFxCxDxBxegedabagacad
+
+local git_branch='$(git_prompt_info)%{$reset_color%}$(git_remote_status)'
+
+PROMPT="%{$fg[green]%}╭─%n@%m %{$reset_color%}%{$fg[yellow]%}in %~ %{$reset_color%}${git_branch}
+%{$fg[green]%}╰\$ %{$reset_color%}"
+
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}on "
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
+
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}%{$fg[red]%} ✘ %{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔ %{$reset_color%}"
+
+ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED=true
+ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX="%{$fg[yellow]%}("
+ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
+
+ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=" +"
+ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR=%{$fg[green]%}
+
+ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE=" -"
+ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR=%{$fg[red]%}
+
diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme
index cb1c43c56..ca1676fb5 100644
--- a/themes/trapd00r.zsh-theme
+++ b/themes/trapd00r.zsh-theme
@@ -86,7 +86,7 @@ prompt_jnrowe_precmd () {
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%}
+%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
> '
fi
}
diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme
index 017139100..fd8adc41e 100644
--- a/themes/ys.zsh-theme
+++ b/themes/ys.zsh-theme
@@ -14,12 +14,35 @@ function box_name {
# Directory info.
local current_dir='${PWD/#$HOME/~}'
+# VCS
+YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} "
+YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}"
+YS_VCS_PROMPT_SUFFIX="%{$reset_color%}"
+YS_VCS_PROMPT_DIRTY=" %{$fg[red]%}x"
+YS_VCS_PROMPT_CLEAN=" %{$fg[green]%}o"
+
# Git info.
local git_info='$(git_prompt_info)'
-ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}on%{$reset_color%} git:%{$fg[cyan]%}"
-ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}x"
-ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}o"
+ZSH_THEME_GIT_PROMPT_PREFIX="${YS_VCS_PROMPT_PREFIX1}git${YS_VCS_PROMPT_PREFIX2}"
+ZSH_THEME_GIT_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX"
+ZSH_THEME_GIT_PROMPT_DIRTY="$YS_VCS_PROMPT_DIRTY"
+ZSH_THEME_GIT_PROMPT_CLEAN="$YS_VCS_PROMPT_CLEAN"
+
+# HG info
+local hg_info='$(ys_hg_prompt_info)'
+ys_hg_prompt_info() {
+ # make sure this is a hg dir
+ if [ -d '.hg' ]; then
+ echo -n "${YS_VCS_PROMPT_PREFIX1}hg${YS_VCS_PROMPT_PREFIX2}"
+ echo -n $(hg branch 2>/dev/null)
+ if [ -n "$(hg status 2>/dev/null)" ]; then
+ echo -n "$YS_VCS_PROMPT_DIRTY"
+ else
+ echo -n "$YS_VCS_PROMPT_CLEAN"
+ fi
+ echo -n "$YS_VCS_PROMPT_SUFFIX"
+ fi
+}
# Prompt format: \n # USER at MACHINE in DIRECTORY on git:BRANCH STATE [TIME] \n $
PROMPT="
@@ -29,6 +52,7 @@ PROMPT="
%{$fg[green]%}$(box_name) \
%{$fg[white]%}in \
%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
+${hg_info}\
${git_info} \
%{$fg[white]%}[%*]
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
@@ -41,6 +65,7 @@ PROMPT="
%{$fg[green]%}$(box_name) \
%{$fg[white]%}in \
%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
+${hg_info}\
${git_info} \
%{$fg[white]%}[%*]
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"