X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fthemes%2Favit.zsh-theme;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fthemes%2Favit.zsh-theme;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=f90ba331b92c0f8e3fb595898a7bcf4033439541;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/themes/avit.zsh-theme b/stow/oh-my-zsh/.oh-my-zsh/themes/avit.zsh-theme deleted file mode 100644 index f90ba33..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/themes/avit.zsh-theme +++ /dev/null @@ -1,85 +0,0 @@ -# AVIT ZSH Theme - -# settings -typeset +H _current_dir="%{$fg_bold[blue]%}%3~%{$reset_color%} " -typeset +H _return_status="%{$fg_bold[red]%}%(?..⍉)%{$reset_color%}" -typeset +H _hist_no="%{$fg[grey]%}%h%{$reset_color%}" - -PROMPT=' -$(_user_host)${_current_dir} $(git_prompt_info) $(ruby_prompt_info) -%{%(!.${fg[red]}.${fg[white]})%}▶%{$reset_color%} ' - -PROMPT2='%{%(!.${fg[red]}.${fg[white]})%}◀%{$reset_color%} ' - -RPROMPT='$(vi_mode_prompt_info)%{$(echotc UP 1)%}$(_git_time_since_commit) $(git_prompt_status) ${_return_status}%{$(echotc DO 1)%}' - -function _user_host() { - local me - if [[ -n $SSH_CONNECTION ]]; then - me="%n@%m" - elif [[ $LOGNAME != $USERNAME ]]; then - me="%n" - fi - if [[ -n $me ]]; then - echo "%{$fg[cyan]%}$me%{$reset_color%}:" - fi -} - -# 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() { - local last_commit now seconds_since_last_commit - local minutes hours days years commit_age - # Only proceed if there is actually a commit. - if last_commit=$(command git -c log.showSignature=false log --format='%at' -1 2>/dev/null); then - now=$(date +%s) - seconds_since_last_commit=$((now-last_commit)) - - # Totals - minutes=$((seconds_since_last_commit / 60)) - hours=$((minutes / 60)) - days=$((hours / 24)) - years=$((days / 365)) - - if [[ $years -gt 0 ]]; then - commit_age="${years}y$((days % 365 ))d" - elif [[ $days -gt 0 ]]; then - commit_age="${days}d$((hours % 24))h" - elif [[ $hours -gt 0 ]]; then - commit_age+="${hours}h$(( minutes % 60 ))m" - else - commit_age="${minutes}m" - fi - - echo "${ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL}${commit_age}%{$reset_color%}" - fi -} - -MODE_INDICATOR="%{$fg_bold[yellow]%}❮%{$reset_color%}%{$fg[yellow]%}❮❮%{$reset_color%}" - -# Git prompt settings -ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}✚ " -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[cyan]%}§ " -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[white]%}◒ " - -# Ruby prompt settings -ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[grey]%}" -ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$reset_color%}" - -# Colors vary depending on time lapsed. -ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}" -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 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'