summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/adben.zsh-theme15
-rw-r--r--themes/apple.zsh-theme1
-rw-r--r--themes/awesomepanda.zsh-theme8
-rw-r--r--themes/gnzh.zsh-theme3
-rw-r--r--themes/half-life.zsh-theme2
-rw-r--r--themes/jispwoso.zsh-theme10
-rw-r--r--themes/jonathan.zsh-theme5
-rw-r--r--themes/kolo.zsh-theme2
-rw-r--r--themes/linuxonly.zsh-theme1
-rw-r--r--themes/mikeh.zsh-theme2
-rw-r--r--themes/rkj-repos.zsh-theme14
-rw-r--r--themes/simonoff.zsh-theme5
-rw-r--r--themes/steeef.zsh-theme2
-rw-r--r--themes/trapd00r.zsh-theme2
-rw-r--r--themes/ys.zsh-theme33
-rw-r--r--themes/zhann.zsh-theme2
16 files changed, 58 insertions, 49 deletions
diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme
index 6869c8a20..212b823a5 100644
--- a/themes/adben.zsh-theme
+++ b/themes/adben.zsh-theme
@@ -69,17 +69,17 @@ function precmd {
#Choose from all databases, regardless of whether they are considered "offensive"
fortune -a
}
- #obtains the tip
+ #obtains the tip
ps1_command_tip () {
wget -qO - http://www.commandlinefu.com/commands/random/plaintext | sed 1d | sed '/^$/d'
- }
+ }
prompt_header () {
if [[ "true" == "$ENABLE_COMMAND_TIP" ]]; then
ps1_command_tip
else
ps1_fortune
- fi
- }
+ fi
+ }
PROMPT_HEAD="${RED_START}${PR_YELLOW}$(prompt_header)${PR_RESET}"
# set a simple variable to show when in screen
if [[ -n "${WINDOW}" ]]; then
@@ -99,11 +99,8 @@ prompt_context () {
set_prompt () {
# required for the prompt
setopt prompt_subst
- autoload colors zsh/terminfo
- if [[ "$terminfo[colors]" -gt 8 ]]; then
- colors
- fi
-
+ autoload zsh/terminfo
+
# ######### PROMPT #########
PROMPT='${PROMPT_HEAD}
${RED_START}$(prompt_context)
diff --git a/themes/apple.zsh-theme b/themes/apple.zsh-theme
index 275341dc6..95e6249fa 100644
--- a/themes/apple.zsh-theme
+++ b/themes/apple.zsh-theme
@@ -7,7 +7,6 @@ get_git_dirty() {
}
autoload -Uz vcs_info
-autoload -U colors && colors
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
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/gnzh.zsh-theme b/themes/gnzh.zsh-theme
index 0519fbefb..ab154c1e5 100644
--- a/themes/gnzh.zsh-theme
+++ b/themes/gnzh.zsh-theme
@@ -2,8 +2,7 @@
# Based on bira theme
# load some modules
-autoload -U colors zsh/terminfo # Used in the colour alias below
-colors
+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)
diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme
index 942affa94..a3c505706 100644
--- a/themes/half-life.zsh-theme
+++ b/themes/half-life.zsh-theme
@@ -13,8 +13,6 @@ function virtualenv_info {
PR_GIT_UPDATE=1
setopt prompt_subst
-autoload colors
-colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
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/jonathan.zsh-theme b/themes/jonathan.zsh-theme
index bca92970c..2f0e77431 100644
--- a/themes/jonathan.zsh-theme
+++ b/themes/jonathan.zsh-theme
@@ -44,10 +44,7 @@ setprompt () {
###
# See if we can use colors.
- autoload colors zsh/terminfo
- if [[ "$terminfo[colors]" -ge 8 ]]; then
- colors
- fi
+ autoload zsh/terminfo
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}]%}'
diff --git a/themes/kolo.zsh-theme b/themes/kolo.zsh-theme
index e743289c3..51b0af724 100644
--- a/themes/kolo.zsh-theme
+++ b/themes/kolo.zsh-theme
@@ -1,5 +1,3 @@
-autoload -U colors && colors
-
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●'
diff --git a/themes/linuxonly.zsh-theme b/themes/linuxonly.zsh-theme
index a11b80d7f..f9e0aa07d 100644
--- a/themes/linuxonly.zsh-theme
+++ b/themes/linuxonly.zsh-theme
@@ -13,7 +13,6 @@ local c7=$(printf "\033[38;5;149m")
local c8=$(printf "\033[38;5;126m")
local c9=$(printf "\033[38;5;162m")
-local foopath=$(perl /home/scp1/bin/foopath)
if [ "$TERM" = "linux" ]; then
c1=$(printf "\033[34;1m")
diff --git a/themes/mikeh.zsh-theme b/themes/mikeh.zsh-theme
index 943f04d38..a95383ba5 100644
--- a/themes/mikeh.zsh-theme
+++ b/themes/mikeh.zsh-theme
@@ -1,6 +1,4 @@
setopt prompt_subst
-autoload colors
-colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme
index eed084f15..a3f1f3dfa 100644
--- a/themes/rkj-repos.zsh-theme
+++ b/themes/rkj-repos.zsh-theme
@@ -15,14 +15,16 @@ 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_UNTRACKED="%{$fg[blue]%}✈"
+ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg[blue]%}"
+ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}"
function mygit() {
- ref1=$(git symbolic-ref HEAD 2> /dev/null) || return
- ref2=$(git rev-parse HEAD | head -c 6) || return
- ref="$ref1 %{$fg[grey]%}$ref2"
- #ref=$(git symbolic-ref HEAD 2> /dev/null) $(git rev-parse HEAD | head -c 6) || return
- echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$( git_prompt_status )%{$reset_color%}$ZSH_THEME_GIT_PROMPT_SUFFIX "
+ if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then
+ ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
+ ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
+ echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(git_prompt_short_sha)$( git_prompt_status )%{$reset_color%}$ZSH_THEME_GIT_PROMPT_SUFFIX "
+ fi
}
function retcode() {}
diff --git a/themes/simonoff.zsh-theme b/themes/simonoff.zsh-theme
index fb4d32e24..63ce4261b 100644
--- a/themes/simonoff.zsh-theme
+++ b/themes/simonoff.zsh-theme
@@ -63,10 +63,7 @@ setprompt () {
###
# See if we can use colors.
- autoload colors zsh/terminfo
- if [[ "$terminfo[colors]" -ge 8 ]]; then
- colors
- fi
+ autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme
index e38188d35..13728ca9a 100644
--- a/themes/steeef.zsh-theme
+++ b/themes/steeef.zsh-theme
@@ -15,8 +15,6 @@ function virtualenv_info {
PR_GIT_UPDATE=1
setopt prompt_subst
-autoload colors
-colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
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%}"
diff --git a/themes/zhann.zsh-theme b/themes/zhann.zsh-theme
index 5c0854730..27597ec6c 100644
--- a/themes/zhann.zsh-theme
+++ b/themes/zhann.zsh-theme
@@ -1,5 +1,3 @@
-autoload -U colors && colors
-
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●'