diff options
Diffstat (limited to 'themes')
-rw-r--r-- | themes/agnoster.zsh-theme | 17 | ||||
-rw-r--r-- | themes/rkj-repos.zsh-theme | 2 | ||||
-rw-r--r-- | themes/rkj.zsh-theme | 3 | ||||
-rw-r--r-- | themes/superjarin.zsh-theme | 6 |
4 files changed, 20 insertions, 8 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index a9de8c84e..c7a59ad0d 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -26,7 +26,7 @@ # A few utility functions to make it easy and re-usable to draw segmented prompts CURRENT_BG='NONE' -SEGMENT_SEPARATOR='⮀' +SEGMENT_SEPARATOR='' # Begin a segment # Takes two arguments, background and foreground. Both can be omitted, @@ -90,7 +90,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_}" + echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_}" fi } @@ -110,7 +110,7 @@ prompt_hg() { # if working copy is clean prompt_segment green black fi - echo -n $(hg prompt "⭠ {rev}@{branch}") $st + echo -n $(hg prompt " {rev}@{branch}") $st else st="" rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g') @@ -124,7 +124,7 @@ prompt_hg() { else prompt_segment green black fi - echo -n "⭠ $rev@$branch" $st + echo -n " $rev@$branch" $st fi fi } @@ -134,6 +134,14 @@ prompt_dir() { prompt_segment blue black '%~' } +# Virtualenv: current working virtualenv +prompt_virtualenv() { + local virtualenv_path="$VIRTUAL_ENV" + if [[ -n $virtualenv_path ]]; then + prompt_segment blue black "(`basename $virtualenv_path`)" + fi +} + # Status: # - was there an error # - am I root @@ -152,6 +160,7 @@ prompt_status() { build_prompt() { RETVAL=$? prompt_status + prompt_virtualenv prompt_context prompt_dir prompt_git diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme index 46b8e83a0..4ab3bc757 100644 --- a/themes/rkj-repos.zsh-theme +++ b/themes/rkj-repos.zsh-theme @@ -22,6 +22,8 @@ function mygit() { echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$( git_prompt_status )%{$reset_color%}$ZSH_THEME_GIT_PROMPT_SUFFIX" } +function retcode() {} + # alternate prompt with git & hg PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} %{\e[0;34m%}%B└─%B[%{\e[1;35m%}%?$(retcode)%{\e[0;34m%}%B] <$(mygit)$(hg_prompt_info)>%{\e[0m%}%b ' diff --git a/themes/rkj.zsh-theme b/themes/rkj.zsh-theme index 80122d5c6..fe06161c8 100644 --- a/themes/rkj.zsh-theme +++ b/themes/rkj.zsh-theme @@ -2,7 +2,8 @@ # on two lines for easier vgrepping # entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +function retcode() {} + PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} %{\e[0;34m%}%B└─%B[%{\e[1;35m%}%?$(retcode)%{\e[0;34m%}%B]%{\e[0m%}%b ' - diff --git a/themes/superjarin.zsh-theme b/themes/superjarin.zsh-theme index 86955a560..2920d17a2 100644 --- a/themes/superjarin.zsh-theme +++ b/themes/superjarin.zsh-theme @@ -11,13 +11,13 @@ fi # Append the current git branch, if in a git repository JARIN_CURRENT_LOCA_="%{$fg_bold[cyan]%}%~\$(git_prompt_info)%{$reset_color%}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%} <%{$fg[magenta]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[white]%}" # Do nothing if the branch is clean (no changes). -ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%}>" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[white]%}>" # Add a yellow ✗ if the branch is dirty -ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}> %{$fg[yellow]%}✗" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[white]%}> %{$fg[yellow]%}✗" # Put it all together! PROMPT="$JARIN_CURRENT_RUBY_ $JARIN_CURRENT_LOCA_ " |