summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/adben.zsh-theme15
-rw-r--r--themes/agnoster.zsh-theme4
-rw-r--r--themes/apple.zsh-theme1
-rw-r--r--themes/bureau.zsh-theme2
-rw-r--r--themes/gnzh.zsh-theme3
-rw-r--r--themes/half-life.zsh-theme2
-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/mira.zsh-theme29
-rw-r--r--themes/mortalscumbag.zsh-theme6
-rw-r--r--themes/rkj-repos.zsh-theme2
-rw-r--r--themes/simonoff.zsh-theme5
-rw-r--r--themes/steeef.zsh-theme2
-rw-r--r--themes/zhann.zsh-theme2
16 files changed, 45 insertions, 38 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/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 7a62bd860..8c7be6e01 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -123,10 +123,10 @@ prompt_hg() {
st=""
rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
branch=$(hg id -b 2>/dev/null)
- if `hg st | grep -Eq "^\?"`; then
+ if `hg st | grep -q "^\?"`; then
prompt_segment red black
st='±'
- elif `hg st | grep -Eq "^(M|A)"`; then
+ elif `hg st | grep -q "^(M|A)"`; then
prompt_segment yellow black
st='±'
else
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/bureau.zsh-theme b/themes/bureau.zsh-theme
index 443d1d5ee..148abec10 100644
--- a/themes/bureau.zsh-theme
+++ b/themes/bureau.zsh-theme
@@ -31,7 +31,7 @@ bureau_git_status () {
if $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
fi
- if $(echo "$_INDEX" | grep -E '^\?\? ' &> /dev/null); then
+ if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then
_STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"
fi
if $(echo "$_INDEX" | grep '^UU ' &> /dev/null); then
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/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/mira.zsh-theme b/themes/mira.zsh-theme
new file mode 100644
index 000000000..e6c952998
--- /dev/null
+++ b/themes/mira.zsh-theme
@@ -0,0 +1,29 @@
+# Based on bira zsh theme with nvm, rvm and jenv support
+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=''
+if which rvm-prompt &> /dev/null; then
+ rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
+else
+ if which rbenv &> /dev/null; then
+ rvm_ruby='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}'
+ fi
+fi
+
+local nvm_node=''
+nvm_node='%{$fg[green]%}‹node-$(nvm_prompt_info)›%{$reset_color%}'
+
+local jenv_java=''
+jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}'
+
+local git_branch='$(git_prompt_info)%{$reset_color%}'
+
+PROMPT="╭─${user_host} ${current_dir} ${nvm_node} ${rvm_ruby} ${jenv_java} ${git_branch}
+╰─%B$%b "
+RPS1="${return_code}"
+
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
+ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme
index 5dbf2e4f6..ccce4197a 100644
--- a/themes/mortalscumbag.zsh-theme
+++ b/themes/mortalscumbag.zsh-theme
@@ -10,12 +10,12 @@ function my_git_prompt() {
fi
# is anything staged?
- if $(echo "$INDEX" | grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then
+ if $(echo "$INDEX" | command grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED"
fi
# is anything unstaged?
- if $(echo "$INDEX" | grep -E -e '^[ MARC][MD] ' &> /dev/null); then
+ if $(echo "$INDEX" | command grep -E -e '^[ MARC][MD] ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"
fi
@@ -25,7 +25,7 @@ function my_git_prompt() {
fi
# is anything unmerged?
- if $(echo "$INDEX" | grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then
+ if $(echo "$INDEX" | command grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"
fi
diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme
index 6289427c2..eed084f15 100644
--- a/themes/rkj-repos.zsh-theme
+++ b/themes/rkj-repos.zsh-theme
@@ -4,7 +4,7 @@
function hg_prompt_info {
hg prompt --angle-brackets "\
-<hg:%{$fg[magenta]%}<branch>%{$reset_color%}>\
+<hg:%{$fg[magenta]%}<branch>%{$reset_color%}><:%{$fg[magenta]%}<bookmark>%{$reset_color%}>\
</%{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
%{$fg[red]%}<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
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/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}●'