diff options
Diffstat (limited to 'themes')
41 files changed, 169 insertions, 121 deletions
| diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme index e4774cf0e..b9ac77d00 100644 --- a/themes/adben.zsh-theme +++ b/themes/adben.zsh-theme @@ -6,7 +6,7 @@  # # a) displaying a pseudo-random message from a database of quotations  # # (https://en.wikipedia.org/wiki/Fortune_%28Unix%29)  # # b) displaying randomly command line tips from The command line fu -# # (http://www.commandlinefu.com) community: in order to make use of this functionality +# # (https://www.commandlinefu.com) community: in order to make use of this functionality  # # you will need Internet connection.  # # This theme provides as well information for the current user's context, like;  # # branch and status for the current version control system (git and svn currently @@ -23,11 +23,11 @@  # # optionally:  # # -Oh-myzsh vcs plug-ins git and svn.  # # -Solarized theme (https://github.com/altercation/solarized/) -# # -OS X: iTerm 2 (http://www.iterm2.com/) +# # -OS X: iTerm 2 (https://iterm2.com/)  # # -font Source code pro (https://github.com/adobe/source-code-pro)  # #  # # This theme's look and feel is based on the Aaron Toponce's zsh theme, more info: -# # http://pthree.org/2008/11/23/727/ +# # https://pthree.org/2008/11/23/727/  # # enjoy!  ########## COLOR ###########  for COLOR in CYAN WHITE YELLOW MAGENTA BLACK BLUE RED DEFAULT GREEN GREY; do diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 07546fd34..0edb773aa 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -13,9 +13,13 @@  #  # In addition, I recommend the  # [Solarized theme](https://github.com/altercation/solarized/) and, if you're -# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app - +# using it on Mac OS X, [iTerm 2](https://iterm2.com/) over Terminal.app -  # it has significantly better color fidelity.  # +# If using with "light" variant of the Solarized color schema, set +# SOLARIZED_THEME variable to "light". If you don't specify, we'll assume +# you're using the "dark" variant. +#  # # Goals  #  # The aim of this theme is to only show you *relevant* information. Like most @@ -30,6 +34,11 @@  CURRENT_BG='NONE' +case ${SOLARIZED_THEME:-dark} in +    light) CURRENT_FG='white';; +    *)     CURRENT_FG='black';; +esac +  # Special Powerline characters  () { @@ -80,28 +89,31 @@ prompt_end() {  # Context: user@hostname (who am I and where am I)  prompt_context() {    if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then -    prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m" +    prompt_segment black default "%(!.%{%F{yellow}%}.)%n@%m"    fi  }  # Git: branch/detached head, dirty status  prompt_git() {    (( $+commands[git] )) || return +  if [[ "$(git config --get oh-my-zsh.hide-status 2>/dev/null)" = 1 ]]; then +    return +  fi    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 +    repo_path=$(git rev-parse --git-dir 2>/dev/null)      dirty=$(parse_git_dirty)      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 -      prompt_segment green black +      prompt_segment green $CURRENT_FG      fi      if [[ -e "${repo_path}/BISECT_LOG" ]]; then @@ -151,7 +163,7 @@ prompt_bzr() {  prompt_hg() {    (( $+commands[hg] )) || return -  local rev status +  local rev st branch    if $(hg id >/dev/null 2>&1); then      if $(hg prompt >/dev/null 2>&1); then        if [[ $(hg prompt "{status|unknown}") = "?" ]]; then @@ -164,7 +176,7 @@ prompt_hg() {          st='±'        else          # if working copy is clean -        prompt_segment green black +        prompt_segment green $CURRENT_FG        fi        echo -n $(hg prompt "☿ {rev}@{branch}") $st      else @@ -178,7 +190,7 @@ prompt_hg() {          prompt_segment yellow black          st='±'        else -        prompt_segment green black +        prompt_segment green $CURRENT_FG        fi        echo -n "☿ $rev@$branch" $st      fi @@ -187,7 +199,7 @@ prompt_hg() {  # Dir: current working directory  prompt_dir() { -  prompt_segment blue black '%~' +  prompt_segment blue $CURRENT_FG '%~'  }  # Virtualenv: current working virtualenv @@ -203,8 +215,8 @@ prompt_virtualenv() {  # - am I root  # - are there background jobs?  prompt_status() { -  local symbols -  symbols=() +  local -a symbols +    [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"    [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"    [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" diff --git a/themes/amuse.zsh-theme b/themes/amuse.zsh-theme index 4e7361ced..d3f15ace5 100644 --- a/themes/amuse.zsh-theme +++ b/themes/amuse.zsh-theme @@ -9,7 +9,7 @@ rbenv_version() {  }  PROMPT=' -%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%} +%{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%}  $ '  # Must use Powerline font, for \uE0A0 to render. diff --git a/themes/arrow.zsh-theme b/themes/arrow.zsh-theme index d62dcdcb9..a3e77d65d 100644 --- a/themes/arrow.zsh-theme +++ b/themes/arrow.zsh-theme @@ -8,7 +8,7 @@ ZSH_THEME_GIT_PROMPT_SUFFIX=""  ZSH_THEME_GIT_PROMPT_DIRTY="*"  ZSH_THEME_GIT_PROMPT_CLEAN="" -# See http://geoff.greer.fm/lscolors/ +# See https://geoff.greer.fm/lscolors/  export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx"  export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=31;40:cd=31;40:su=31;40:sg=31;40:tw=31;40:ow=31;40:" diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme index 4f0dcbcc6..aec14e4a6 100644 --- a/themes/avit.zsh-theme +++ b/themes/avit.zsh-theme @@ -50,9 +50,7 @@ function _ruby_version() {  # use a neutral color, otherwise colors will vary according to time.  function _git_time_since_commit() {  # 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) +  if last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null); then      now=$(date +%s)      seconds_since_last_commit=$((now-last_commit)) @@ -65,7 +63,7 @@ function _git_time_since_commit() {      sub_hours=$((hours % 24))      sub_minutes=$((minutes % 60)) -    if [ $hours -gt 24 ]; then +    if [ $hours -ge 24 ]; then        commit_age="${days}d"      elif [ $minutes -gt 60 ]; then        commit_age="${sub_hours}h${sub_minutes}m" @@ -104,7 +102,7 @@ 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[white]%}" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://geoff.greer.fm/lscolors/  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/bira.zsh-theme b/themes/bira.zsh-theme index 29bda0be8..675483996 100644 --- a/themes/bira.zsh-theme +++ b/themes/bira.zsh-theme @@ -1,4 +1,4 @@ -# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png +# ZSH Theme - Preview: https://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png  local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme index 9d2103926..30ce785c0 100644 --- a/themes/candy-kingdom.zsh-theme +++ b/themes/candy-kingdom.zsh-theme @@ -17,7 +17,7 @@ function box_name {  }  PROMPT=' -%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) +%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}%~%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)  %(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ '  ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[magenta]%}branch: " diff --git a/themes/clean.zsh-theme b/themes/clean.zsh-theme index 7ee29cb8c..5c96e4726 100644 --- a/themes/clean.zsh-theme +++ b/themes/clean.zsh-theme @@ -9,6 +9,6 @@ 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/ +# LS colors, made with https://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:' diff --git a/themes/cloud.zsh-theme b/themes/cloud.zsh-theme index 4efbf9776..59a3472b6 100644 --- a/themes/cloud.zsh-theme +++ b/themes/cloud.zsh-theme @@ -6,5 +6,5 @@ PROMPT='%{$fg_bold[cyan]%}$ZSH_THEME_CLOUD_PREFIX %{$fg_bold[green]%}%p %{$fg[gr  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]%}]"
\ No newline at end of file +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡ %{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]" diff --git a/themes/dstufft.zsh-theme b/themes/dstufft.zsh-theme index 5a23fcea5..39ce69819 100644 --- a/themes/dstufft.zsh-theme +++ b/themes/dstufft.zsh-theme @@ -9,7 +9,7 @@ function virtualenv_info {  }  PROMPT=' -%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) +%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info)  $(virtualenv_info)$(prompt_char) '  ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" diff --git a/themes/duellj.zsh-theme b/themes/duellj.zsh-theme index 3849c35be..f70b39bc3 100644 --- a/themes/duellj.zsh-theme +++ b/themes/duellj.zsh-theme @@ -1,6 +1,6 @@  # user, host, full path, and time/date  # 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 +# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888  PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;34m%}@%{\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%}%!%{\e[0;34m%}%B]%b%{\e[0m%}  %{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]%{\e[0m%}%b '  RPROMPT='[%*]' diff --git a/themes/emotty.zsh-theme b/themes/emotty.zsh-theme index 34d491ff0..13adad78d 100644 --- a/themes/emotty.zsh-theme +++ b/themes/emotty.zsh-theme @@ -68,6 +68,10 @@ prompt_glyph="%{%(#.${root_prompt}.${user_prompt}) %2G%}"  setopt promptsubst +# Workaround for zsh 5.2 release (kudos to @timothybasanov) +autoload +X VCS_INFO_nvcsformats +functions[VCS_INFO_nvcsformats]=${functions[VCS_INFO_nvcsformats]/local -a msgs/} +  autoload -U add-zsh-hook  autoload -Uz vcs_info diff --git a/themes/example.zsh-theme b/themes/example.zsh-theme deleted file mode 100644 index dbd9dc9c9..000000000 --- a/themes/example.zsh-theme +++ /dev/null @@ -1,5 +0,0 @@ -# Found on the ZshWiki -#  http://zshwiki.org/home/config/prompt -# - -PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% "
\ No newline at end of file diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme index 9b1db3a08..9caebc69e 100644 --- a/themes/fino-time.zsh-theme +++ b/themes/fino-time.zsh-theme @@ -25,12 +25,15 @@ function box_name {  } -local rvm_ruby='‹$(rvm-prompt i v g)›%{$reset_color%}' -local current_dir='${PWD/#$HOME/~}' +rvm_ruby='' +if type rvm-prompt &>/dev/null; then +    rvm_ruby='using%{$FG[243]%}‹$(rvm-prompt i v g)›%{$reset_color%}' +fi +  local git_info='$(git_prompt_info)' -PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%} ${rvm_ruby} %D - %* +PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}%~%{$reset_color%}${git_info} %{$FG[239]%}${rvm_ruby} %D - %*  ╰─$(virtualenv_info)$(prompt_char) "  ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}" diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme index 6eec097f5..28d6cc2ec 100644 --- a/themes/fino.zsh-theme +++ b/themes/fino.zsh-theme @@ -22,19 +22,18 @@ function box_name {  local ruby_env=''  if which rvm-prompt &> /dev/null; then -  ruby_env=' ‹$(rvm-prompt i v g)›%{$reset_color%}' +  ruby_env='using%{$FG[243]%} ‹$(rvm-prompt i v g)›%{$reset_color%}'  else    if which rbenv &> /dev/null; then -    ruby_env=' ‹$(rbenv version-name)›%{$reset_color%}' +    ruby_env='using%{$FG[243]%} ‹$(rbenv version-name)›%{$reset_color%}'    fi  fi -local current_dir='${PWD/#$HOME/~}'  local git_info='$(git_prompt_info)'  local prompt_char='$(prompt_char)' -PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%}${ruby_env} +PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}%~%{$reset_color%}${git_info} %{$FG[239]%}${ruby_env}  ╰─${prompt_char}%{$reset_color%} "  ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}" diff --git a/themes/funky.zsh-theme b/themes/funky.zsh-theme index 2451296d9..574538f88 100644 --- a/themes/funky.zsh-theme +++ b/themes/funky.zsh-theme @@ -1,5 +1,5 @@  # Taken from Tassilo's Blog -# http://tsdh.wordpress.com/2007/12/06/my-funky-zsh-prompt/ +# https://tsdh.wordpress.com/2007/12/06/my-funky-zsh-prompt/  local blue_op="%{$fg[blue]%}[%{$reset_color%}"  local blue_cp="%{$fg[blue]%}]%{$reset_color%}" @@ -11,4 +11,4 @@ local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color  PROMPT="╭─${path_p}─${user_host}─${ret_status}─${hist_no}  ╰─${blue_op}${smiley}${blue_cp} %# "  local cur_cmd="${blue_op}%_${blue_cp}" -PROMPT2="${cur_cmd}> "
\ No newline at end of file +PROMPT2="${cur_cmd}> " diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme index 04b0450a8..c763ef3c6 100644 --- a/themes/gnzh.zsh-theme +++ b/themes/gnzh.zsh-theme @@ -1,4 +1,3 @@ -# ZSH Theme - Preview: http://dl.dropbox.com/u/4109351/pics/gnzh-zsh-theme.png  # Based on bira theme  setopt prompt_subst diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme index 5f987099d..c79027ed6 100644 --- a/themes/half-life.zsh-theme +++ b/themes/half-life.zsh-theme @@ -1,11 +1,11 @@  # prompt style and colors based on Steve Losh's Prose theme: -# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme +# https://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 +# https://briancarper.net/blog/570/git-info-in-your-zsh-prompt  function virtualenv_info {      [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' @@ -60,7 +60,7 @@ zstyle ':vcs_info:*:prompt:*' nvcsformats   ""  function steeef_preexec { -    case "$(history $HISTCMD)" in +    case "$2" in          *git*)              PR_GIT_UPDATE=1              ;; diff --git a/themes/itchy.zsh-theme b/themes/itchy.zsh-theme index c23889edf..e1f2d56e2 100644 --- a/themes/itchy.zsh-theme +++ b/themes/itchy.zsh-theme @@ -1,5 +1,3 @@ -# Inspired by http://peepcode.com/blog/2012/my-command-line-prompt -  local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})"  local user="%{$fg[cyan]%}%n%{$reset_color%}" diff --git a/themes/jreese.zsh-theme b/themes/jreese.zsh-theme index 0fa6b4ecd..de42a1010 100644 --- a/themes/jreese.zsh-theme +++ b/themes/jreese.zsh-theme @@ -1,5 +1,3 @@ -# ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png -  if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi  local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" diff --git a/themes/lambda.zsh-theme b/themes/lambda.zsh-theme index 63292d331..6e67773ea 100644 --- a/themes/lambda.zsh-theme +++ b/themes/lambda.zsh-theme @@ -1,5 +1,3 @@ -# ZSH Theme - Preview: http://cl.ly/350F0F0k1M2y3A2i3p1S -  PROMPT='λ %~/ $(git_prompt_info)%{$reset_color%}'  ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}" diff --git a/themes/lukerandall.zsh-theme b/themes/lukerandall.zsh-theme index f4045bd8e..cdecd284f 100644 --- a/themes/lukerandall.zsh-theme +++ b/themes/lukerandall.zsh-theme @@ -1,4 +1,4 @@ -# ZSH Theme - Preview: http://cl.ly/f701d00760f8059e06dc +# ZSH Theme - Preview: https://cl.ly/f701d00760f8059e06dc  # Thanks to gallifrey, upon whose theme this is based  local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})" diff --git a/themes/macovsky-ruby.zsh-theme b/themes/macovsky-ruby.zsh-theme index 69d80d588..abda6232c 100644 --- a/themes/macovsky-ruby.zsh-theme +++ b/themes/macovsky-ruby.zsh-theme @@ -1,4 +1,4 @@ -# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png +# ZSH Theme - Preview: https://i.gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png  local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"  if [ -e ~/.rvm/bin/rvm-prompt ]; then diff --git a/themes/macovsky.zsh-theme b/themes/macovsky.zsh-theme index 2e6dce42d..d3f7d16b4 100644 --- a/themes/macovsky.zsh-theme +++ b/themes/macovsky.zsh-theme @@ -1,4 +1,4 @@ -# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png +# ZSH Theme - Preview: https://i.gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png  local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"  if [ -e ~/.rvm/bin/rvm-prompt ]; then diff --git a/themes/mh.zsh-theme b/themes/mh.zsh-theme index 34a3765b1..2b2cc9b68 100644 --- a/themes/mh.zsh-theme +++ b/themes/mh.zsh-theme @@ -1,5 +1,5 @@  # mh theme -# preview: http://cl.ly/1y2x0W0E3t2C0F29043z +# preview: https://cl.ly/1y2x0W0E3t2C0F29043z  # features:  # path is autoshortened to ~30 characters @@ -19,6 +19,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[gray]%})%{$reset_color%} "  ZSH_THEME_GIT_PROMPT_CLEAN=""  ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✱" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://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:' diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme index 110e3f203..7ff6a7ffe 100644 --- a/themes/michelebologna.zsh-theme +++ b/themes/michelebologna.zsh-theme @@ -1,16 +1,16 @@  # Michele Bologna's theme -# http://michelebologna.net +# https://www.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  +# * 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:  +# +# 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 diff --git a/themes/mikeh.zsh-theme b/themes/mikeh.zsh-theme index a95383ba5..f231b91bb 100644 --- a/themes/mikeh.zsh-theme +++ b/themes/mikeh.zsh-theme @@ -15,7 +15,7 @@ mikeh_precmd() {  # user, host, full path, and time/date  # 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 +# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888  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{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}  %{\e[0;34m%}%B..%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <($vcs_info_msg_0_)>%{\e[0m%}%b ' -PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
\ No newline at end of file +PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme index 55ece9760..d81a7ca06 100644 --- a/themes/mortalscumbag.zsh-theme +++ b/themes/mortalscumbag.zsh-theme @@ -9,6 +9,11 @@ function my_git_prompt() {      STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"    fi +  # is branch behind? +  if $(echo "$(git log HEAD..origin/$(git_current_branch) 2> /dev/null)" | grep '^commit' &> /dev/null); then +    STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_BEHIND" +  fi +    # is anything staged?    if $(echo "$INDEX" | command grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then      STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED" @@ -52,6 +57,7 @@ PROMPT=$'\n$(ssh_connection)%{$fg_bold[green]%}%n@%m%{$reset_color%}$(my_git_pro  ZSH_THEME_PROMPT_RETURNCODE_PREFIX="%{$fg_bold[red]%}"  ZSH_THEME_GIT_PROMPT_PREFIX=" $fg[white]‹ %{$fg_bold[yellow]%}"  ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[magenta]%}↑" +ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_bold[green]%}↓"  ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●"  ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[red]%}●"  ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[white]%}●" diff --git a/themes/philips.zsh-theme b/themes/philips.zsh-theme index f6e5b324e..fec734bad 100644 --- a/themes/philips.zsh-theme +++ b/themes/philips.zsh-theme @@ -9,6 +9,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} "  ZSH_THEME_GIT_PROMPT_CLEAN=""  ZSH_THEME_GIT_PROMPT_DIRTY="*" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://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:*.patch=00;34:*.o=00;32:*.so=01;35:*.ko=01;31:*.la=00;33' diff --git a/themes/pmcgee.zsh-theme b/themes/pmcgee.zsh-theme index e4e45c71a..58a9b8bef 100644 --- a/themes/pmcgee.zsh-theme +++ b/themes/pmcgee.zsh-theme @@ -11,6 +11,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "  ZSH_THEME_GIT_PROMPT_CLEAN=""  ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}*" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://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:' diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme index ba2a0dba6..65a075456 100644 --- a/themes/rkj-repos.zsh-theme +++ b/themes/rkj-repos.zsh-theme @@ -1,13 +1,13 @@ -# user, host, full path, and time/date -# 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 +# user, host, full path, and time/date on two lines for easier vgrepping  function hg_prompt_info { +  if (( $+commands[hg] )) && grep -q "prompt" ~/.hgrc; then      hg prompt --angle-brackets "\  <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 +  fi  }  ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%}+" @@ -33,4 +33,3 @@ function retcode() {}  PROMPT=$'%{$fg_bold[blue]%}┌─[%{$fg_bold[green]%}%n%b%{$fg[black]%}@%{$fg[cyan]%}%m%{$fg_bold[blue]%}]%{$reset_color%} - %{$fg_bold[blue]%}[%{$fg_bold[white]%}%~%{$fg_bold[blue]%}]%{$reset_color%} - %{$fg_bold[blue]%}[%b%{$fg[yellow]%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{$fg_bold[blue]%}]  %{$fg_bold[blue]%}└─[%{$fg_bold[magenta]%}%?$(retcode)%{$fg_bold[blue]%}] <$(mygit)$(hg_prompt_info)>%{$reset_color%} '  PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' - diff --git a/themes/rkj.zsh-theme b/themes/rkj.zsh-theme index fe06161c8..d7c9314e3 100644 --- a/themes/rkj.zsh-theme +++ b/themes/rkj.zsh-theme @@ -1,6 +1,6 @@  # user, host, full path, and time/date  # 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 +# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888  function retcode() {} diff --git a/themes/simple.zsh-theme b/themes/simple.zsh-theme index a88d9d72a..8d0070ba7 100644 --- a/themes/simple.zsh-theme +++ b/themes/simple.zsh-theme @@ -1,4 +1,4 @@ -PROMPT='%{$fg[green]%}%~%{$fg_bold[blue]%}$(git_prompt_info)%{$reset_color%} ' +PROMPT='%(!.%{$fg[red]%}.%{$fg[green]%})%~%{$fg_bold[blue]%}$(git_prompt_info)%{$reset_color%} '  ZSH_THEME_GIT_PROMPT_PREFIX="("  ZSH_THEME_GIT_PROMPT_SUFFIX=")" diff --git a/themes/sorin.zsh-theme b/themes/sorin.zsh-theme index ac6a49840..e478d2672 100644 --- a/themes/sorin.zsh-theme +++ b/themes/sorin.zsh-theme @@ -1,10 +1,10 @@  # sorin.zsh-theme -# screenshot: http://i.imgur.com/aipDQ.png +# screenshot: https://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]%}" @@ -20,10 +20,10 @@ if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then    ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"    ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"    ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" -else  +else    MODE_INDICATOR="❮❮❮"    local return_status="%(?::⏎)" -   +    PROMPT='%c$(git_prompt_info) %(!.#.❯) '    ZSH_THEME_GIT_PROMPT_PREFIX=" git:" diff --git a/themes/sporty_256.zsh-theme b/themes/sporty_256.zsh-theme index db0fc4277..e008a8664 100644 --- a/themes/sporty_256.zsh-theme +++ b/themes/sporty_256.zsh-theme @@ -1,6 +1,6 @@  # zsh theme requires 256 color enabled terminal  # i.e TERM=xterm-256color -# Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/ +# Preview - https://www.flickr.com/photos/adelcampo/4556482563/sizes/o/  # based on robbyrussell's shell but louder!  PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme index b72a41c92..3532d3bc7 100644 --- a/themes/steeef.zsh-theme +++ b/themes/steeef.zsh-theme @@ -1,11 +1,11 @@  # prompt style and colors based on Steve Losh's Prose theme: -# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme +# https://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 +# https://briancarper.net/blog/570/git-info-in-your-zsh-prompt  export VIRTUAL_ENV_DISABLE_PROMPT=1 @@ -62,10 +62,13 @@ zstyle ':vcs_info:*:prompt:*' nvcsformats   ""  function steeef_preexec { -    case "$(history $HISTCMD)" in +    case "$2" in          *git*)              PR_GIT_UPDATE=1              ;; +        *hub*) +            PR_GIT_UPDATE=1 +            ;;          *svn*)              PR_GIT_UPDATE=1              ;; diff --git a/themes/sunaku.zsh-theme b/themes/sunaku.zsh-theme index 440fa90b4..77f3acc7b 100644 --- a/themes/sunaku.zsh-theme +++ b/themes/sunaku.zsh-theme @@ -1,5 +1,4 @@  # Git-centric variation of the "fishy" theme. -# See screenshot at http://ompldr.org/vOHcwZg  ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}+"  ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[magenta]%}!" diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index a6407034c..426e2bf35 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -7,6 +7,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX=""  ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})"  ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}✗%{$fg_bold[blue]%})" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://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:'
\ No newline at end of file +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:' diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme index 3fa5d57ab..144d2549a 100644 --- a/themes/trapd00r.zsh-theme +++ b/themes/trapd00r.zsh-theme @@ -1,8 +1,9 @@  # trapd00r.zsh-theme  # -# This theme needs a terminal supporting 256 colors as well as unicode. It also -# needs the script that splits up the current path and makes it fancy as located -# here: https://github.com/trapd00r/utils/blob/master/zsh_path +# This theme needs a terminal supporting 256 colors as well as unicode. +# In order to avoid external dependencies, it also has a zsh version of +# the perl script at https://github.com/trapd00r/utils/blob/master/zsh_path, +# which splits up the current path and makes it fancy.  #  # By default it spans over two lines like so:  # @@ -20,37 +21,77 @@  autoload -U add-zsh-hook  autoload -Uz vcs_info -local c0=$( printf "\e[m") -local c1=$( printf "\e[38;5;245m") -local c2=$( printf "\e[38;5;250m") -local c3=$( printf "\e[38;5;242m") -local c4=$( printf "\e[38;5;197m") -local c5=$( printf "\e[38;5;225m") -local c6=$( printf "\e[38;5;240m") -local c7=$( printf "\e[38;5;242m") -local c8=$( printf "\e[38;5;244m") -local c9=$( printf "\e[38;5;162m") -local c10=$(printf "\e[1m") -local c11=$(printf "\e[38;5;208m\e[1m") -local c12=$(printf "\e[38;5;142m\e[1m") -local c13=$(printf "\e[38;5;196m\e[1m") +local c0=$'\e[m' +local c1=$'\e[38;5;245m' +local c2=$'\e[38;5;250m' +local c3=$'\e[38;5;242m' +local c4=$'\e[38;5;197m' +local c5=$'\e[38;5;225m' +local c6=$'\e[38;5;240m' +local c7=$'\e[38;5;242m' +local c8=$'\e[38;5;244m' +local c9=$'\e[38;5;162m' +local c10=$'\e[1m' +local c11=$'\e[38;5;208m\e[1m' +local c12=$'\e[38;5;142m\e[1m' +local c13=$'\e[38;5;196m\e[1m' -# We don't want to use the extended colorset in the TTY / VC. -if [ "$TERM" = "linux" ]; then -    c1=$( printf "\e[34;1m") -    c2=$( printf "\e[35m") -    c3=$( printf "\e[31m") -    c4=$( printf "\e[31;1m") -    c5=$( printf "\e[32m") -    c6=$( printf "\e[32;1m") -    c7=$( printf "\e[33m") -    c8=$( printf "\e[33;1m") -    c9=$( printf "\e[34m") +zsh_path() { +  local colors +  colors=$(echoti colors) + +  local -A yellow +  yellow=( +    1  '%F{228}'   2  '%F{222}'   3  '%F{192}'   4  '%F{186}' +    5  '%F{227}'   6  '%F{221}'   7  '%F{191}'   8  '%F{185}' +    9  '%F{226}'   10  '%F{220}'   11  '%F{190}'   12  '%F{184}' +    13  '%F{214}'   14  '%F{178}'  15  '%F{208}'   16  '%F{172}' +    17  '%F{202}'   18  '%F{166}' +  ) + +  local dir i=1 +  for dir (${(s:/:)PWD}); do +    if [[ $i -eq 1 ]]; then +      if [[ $colors -ge 256 ]]; then +        print -Pn "%F{065}%B /%b" +      else +        print -Pn "\e[31;1m /" +      fi +    else +      if [[ $colors -ge 256 ]]; then +        print -Pn "${yellow[$i]:-%f} » " +      else +        print -Pn "%F{yellow} > " +      fi +    fi + +    (( i++ )) + +    if [[ $colors -ge 256 ]]; then +      print -Pn "%F{065}$dir" +    else +      print -Pn "%F{blue}$dir" +    fi +  done +  print -Pn "%f" +} -    c11=$(printf "\e[35;1m") -    c12=$(printf "\e[36m") -    c13=$(printf "\e[31;1m") + +# We don't want to use the extended colorset in the TTY / VC. +if [ "$TERM" = linux ]; then +  c1=$'\e[34;1m' +  c2=$'\e[35m' +  c3=$'\e[31m' +  c4=$'\e[31;1m' +  c5=$'\e[32m' +  c6=$'\e[32;1m' +  c7=$'\e[33m' +  c8=$'\e[33;1m' +  c9=$'\e[34m' +  c11=$'\e[35;1m' +  c12=$'\e[36m' +  c13=$'\e[31;1m'  fi  zstyle ':vcs_info:*' actionformats \ @@ -70,14 +111,12 @@ prompt_jnrowe_precmd () {      dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"      PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}  > ' - -# modified, to be committed +  # modified, to be committed    elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then      dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"      PROMPT='${vcs_info_msg_0_}%{$30%} %{$bg_bold[red]%}%{$fg_bold[cyan]%}C%{$fg_bold[black]%}OMMIT%{$reset_color%}  %{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}  > ' -    elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then      dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"      PROMPT='${vcs_info_msg_0_}%{$bg_bold[red]%}%{$fg_bold[blue]%}D%{$fg_bold[black]%}IRTY%{$reset_color%} @@ -88,7 +127,5 @@ prompt_jnrowe_precmd () {      PROMPT='${vcs_info_msg_0_}  %{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}  > ' -fi +  fi  } - -#  vim: set ft=zsh sw=2 et tw=0: diff --git a/themes/xiong-chiamiov-plus.zsh-theme b/themes/xiong-chiamiov-plus.zsh-theme index 5fb4fe6f4..aa6ef7421 100644 --- a/themes/xiong-chiamiov-plus.zsh-theme +++ b/themes/xiong-chiamiov-plus.zsh-theme @@ -1,6 +1,6 @@  # user, host, full path, and time/date  # 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 +# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888  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{"%a %b %d, %H:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}  %{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$(git_prompt_info)>%{\e[0m%}%b '  PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' diff --git a/themes/xiong-chiamiov.zsh-theme b/themes/xiong-chiamiov.zsh-theme index 0ed335fb5..b67d9947c 100644 --- a/themes/xiong-chiamiov.zsh-theme +++ b/themes/xiong-chiamiov.zsh-theme @@ -1,6 +1,6 @@  # user, host, full path, and time/date  # 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 +# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888  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{"%a %b %d, %H:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}  %{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]>%{\e[0m%}%b '  PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' | 
