1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | # {{{ variables
# TODO complete bellowing list
# %m -- machine name
# %n -- username
# %c -- base path
# %~ -- full path
# %D -- date
# %T -- time
# %I -- running tasks
# %M -- hostname
# %B
# %b
# %S
# %p --
# %y -- login tty, e.g. pts/1
# %(!.#.$) -- root or user prompt
# %(?, ,%{$fg[red]%}FAIL%{$reset_color%})
# return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
# }}}
# {{{ special characters
# ➤ ↵ » ✔ ✗ ➜ ✚ ✹ ✖ ═ ✭ ⚡ ➭ ❮
# ▍ ♩ & ♫ ♪ ♬ ♭ ♮ ♯ ☺ ☻ :: ⏎
# ♥ ♦ ♣ ♠ • ◘ ○ ◙ ♂ ♀
# ☭ , ⌘ , ☠, ⌥ , ✇ , ⌤ ,
# ⍜ , ✣ , ⌨ , ⌘, ☕
# ☮ ☠ ☻ ❀ ☃ ☆ ☄ ☢ ☉ ◎ ⊙ ░ ⍟
# ↓ ↑ → ← ⇧ ⇩ ⇨ ⇦ ↑ ↓ ≠ ∞ ⿻ □ "
# ☼ ► ◄ ↕
# }}}
# {{{ if ... else ... fi
# root & user
if [ $UID -eq 0 ]; then
CARETCOLOR="red"
# user_prompt="⚡"
# user_prompt="#"
else
CARETCOLOR="green"
# user_prompt="»"
fi
# mpd status
if [ -n "`mpc status | grep playing`" ]; then
music_prompt="%{$fg_bold[cyan]%}♫%{$reset_color%}"
else
music_prompt="%{$fg[black]%}♪%{$reset_color%}"
fi
# }}}
# VCS
# man zshcontrib | ( GATHERING INFORMATION FROM VERSION CONTROL SYSTEMS )
zstyle ':vcs_info:*' enable git cvs svn hg
# {{{ GIT PROMPT
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]%}) %{$fg_bold[green]%}✓%{$reset_color%}"
## git status
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
# ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ⌥"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ⌘"
# }}}
# {{{ RVM PROMPT
ZSH_THEME_RVM_PROMPT_PREFIX="rvm:(%{$fg_bold[red]%}"
ZSH_THEME_RVM_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_RVM_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_RVM_PROMPT_CLEAN="%{$fg[blue]%})"
# local rvm_info='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
# }}}
# {{{ SVN PROMPT
# FIXME svn prompt
ZSH_THEME_SVN_PROMPT_PREFIX="svn:(%{$fg[red]%}"
ZSH_THEME_SVN_PROMPT_SUFFIX="%{$fg[red]%})"
ZSH_THEME_SVN_PROMPT_DIRTY="%{$fg[red]%} ✘ %{$reset_color%}"
ZSH_THEME_SVN_PROMPT_CLEAN="%{$fg_bold[green]%} ✔%{$reset_color%}"
# }}}
# {{{ locale variables
# local full_path='%{$fg[white]%}%~%{$reset_color%}'
local base_path='%{$fg_bold[cyan]%}%c%{$reset_color%}'
# local pre_prompt='%{$fg_bold[$CARETCOLOR]%} $user_prompt %{$reset_color%}'
local pre_prompt='%{$fg_bold[$CARETCOLOR]%} %(!.#.») %{$reset_color%}'
local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})'
local username='%{$fg_bold[green]%}%n%{$reset_color%}'
local hostname='%{$fg[yellow]%}%m%{$reset_color%}'
# local user="%(!.%{$fg[blue]%}.%{$fg[blue]%})%n%{$reset_color%}"
# local host="@${host_repr[$(hostname)]:-$(hostname)}%{$reset_color%}"
local rvm_info='%{$fg[green]%}$(rvm-prompt i v g)%{$fg[green]%}%{$reset_color%}'
# FIXME svn_prompt_info command can not found.
local svn_info='%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}'
local git_branch='%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%}'
local git_status='$(git_prompt_status)%{$reset_color%}'
local male='%{$fg_bold[cyan]%}♂%{$reset_color%}'
local female='%{$fg[magenta]%}♀%{$reset_color%}'
local fuck='%{$fg[red]%}fucked%{$reset_color%}'
# # local time, color coded by last return code
# time_enabled="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}"
# time_disabled="%{$fg[green]%}%*%{$reset_color%}"
# time=$time_enabled
# }}}
# complex version
# outline, path, Git, svn, username, hostname, ssh status, ftp status, time
# PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
# ╰─%B$%b "
# RPS1="${return_code}"
# PS1="\e[34m┌─[\[\e[04;01;32m\]\u\[\e[0m\]\e[34m] \e[01;36m hack \e[0m\e[34m[ \[\e[33;1m\]\w\[\e[0m \]\e[34m]\e[34m\n└─╼ \e[0m \$ "
# PROMPT=" ┌─[ ${username}%{$fg_bold[red]%}@${hostname} ${git_branch}${git_status}${rvm_info}]
# └─╼ ${base_path}${pre_prompt}"
# PS2=$' %{$fg[cyan]%}|>%{$reset_color%} '
# simple version
# path, Git, svn, ssh status, ftp status,
# PROMPT='%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} %{$fg_bold[red]%}» % %{$reset_color%}'
# PROMPT='%{$fg_bold[green]%}%b %{$fg_bold[cyan]%}%c %{$fg_bold[$CARETCOLOR]%}» %{$reset_color%}'
#typeset -A host_repr
#host_repr=('dieter-ws-a7n8x-arch' "%{$fg_bold[green]%}ws" 'dieter-p4sci-arch' "%{$fg_bold[blue]%}p4")
# left side PROMPT
PROMPT=" ${base_path} ${git_branch}${git_status}${svn_info}${rvm_info} ${music_prompt}${pre_prompt}"
# PS1="${return_code}"
# right side PROMPT
RPROMPT="${return_code} ${female} ${fuck} ${male} %T "
# RPS1="${return_code}"
# vim:ft=zsh:fdm=marker
|
x
Notes
If you do not like “fucked” word, please ignore my theme. I’m a part of world. you too.