76e828691bedc345904716b04cfa746fd043e0e7
- Author
- Adolfo Benedetti <adolfo.benedetti@gmail.com>
- Committer
- Adolfo Benedetti <adolfo.benedetti@gmail.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme
2index 9f777e84784a6d803f2164d620ff664e07c14375..b64714f32ea65addc27891e3d532b860c291671c 100644
3--- a/themes/adben.zsh-theme
4+++ b/themes/adben.zsh-theme
5@@ -1,26 +1,121 @@
6 #!/usr/bin/env zsh
7-local USER_HOST='%{$terminfo[bold]$fg[yellow]%}%n@%m%{$reset_color%}'
8-local RETURN_CODE="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
9-local GIT_BRANCH='%{$terminfo[bold]$fg[red]%}$(git_prompt_info)%{$reset_color%}'
10-local CURRENT_DIR='%{$terminfo[bold]$fg[green]%} %~%{$reset_color%}'
11-local RUBY_RVM='%{$fg[gray]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
12-local COMMAND_TIP='%{$terminfo[bold]$fg[blue]%}$(wget -qO - http://www.commandlinefu.com/commands/random/plaintext | sed 1d | sed '/^$/d' | sed 's/^/║/g')%{$reset_color%}'
13-######### PROMPT #########
14-PROMPT="%{$terminfo[bold]$fg[blue]%}╔═ %{$reset_color%}${USER_HOST} ${CURRENT_DIR} ${RUBY_RVM} ${GIT_BRANCH}
15-${COMMAND_TIP}
16-%{$terminfo[bold]$fg[blue]%}╚═ %{$reset_color%}%B%{$terminfo[bold]$fg[white]%}$%b%{$reset_color%} "
17-RPS1='${RETURN_CODE}'
18-RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
19-######### PROMPT #########
20-########## GIT ###########
21-ZSH_THEME_GIT_PROMPT_PREFIX="‹"
22-ZSH_THEME_GIT_PROMPT_SUFFIX="%{$GIT_PROMPT_INFO%}›"
23-ZSH_THEME_GIT_PROMPT_DIRTY=" %{$GIT_DIRTY_COLOR%}✘"
24-ZSH_THEME_GIT_PROMPT_CLEAN=" %{$GIT_CLEAN_COLOR%}✔"
25-ZSH_THEME_GIT_PROMPT_ADDED="%{$FG[082]%}✚%{$reset_color%}"
26-ZSH_THEME_GIT_PROMPT_MODIFIED="%{$FG[166]%}✹%{$reset_color%}"
27-ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[160]%}✖%{$reset_color%}"
28-ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[220]%}➜%{$reset_color%}"
29-ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[082]%}═%{$reset_color%}"
30-ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[190]%}✭%{$reset_color%}"
31-########## GIT ###########
32+# #
33+# # #README
34+# #
35+# # This theme provides two customizable header functionalities :
36+# # a) displaying a pseudo-random message from a database of quotations
37+# # (https://en.wikipedia.org/wiki/Fortune_%28Unix%29)
38+# # b) displaying randomly command line tips from The command line fu
39+# # (http://www.commandlinefu.com) community: in order to make use of this functionality
40+# # you will need Internet connection.
41+# # This theme provides as well information for the current user's context, like;
42+# # branch and status for the current version control system (git and svn currently
43+# # supported) and time, presented to the user in a non invasive volatile way.
44+# #
45+# # #REQUIREMENTS
46+# # This theme requires wget::
47+# # -Homebrew-osx- brew install wget
48+# # -Debian/Ubuntu- apt-get install wget
49+# # and fortune ::
50+# # -Homebrew-osx- brew install fortune
51+# # -Debian/Ubuntu- apt-get install fortune
52+# #
53+# # optionally:
54+# # -Oh-myzsh vcs plug-ins git and svn.
55+# # -Solarized theme (https://github.com/altercation/solarized/)
56+# # -OS X: iTerm 2 (http://www.iterm2.com/)
57+# # -font Source code pro (https://github.com/adobe/source-code-pro)
58+# #
59+# # Author: Adolfo Benedetti
60+# # email: adolfo.benedetti@gmail.com
61+# # License: Public Domain
62+# # This theme's look and feel is based on the Aaron Toponce's zsh theme , more info:
63+# # http://pthree.org/2008/11/23/727/
64+# # enjoy!
65+########## COLOR ###########
66+for COLOR in CYAN WHITE YELLOW MAGENTA BLACK BLUE RED DEFAULT GREEN GREY; do
67+ eval PR_$COLOR='%{$fg[${(L)COLOR}]%}'
68+ eval PR_BRIGHT_$COLOR='%{$fg_bold[${(L)COLOR}]%}'
69+done
70+PR_RESET="%{$reset_color%}"
71+RED_START="${PR_RESET}${PR_GREY}<${PR_RESET}${PR_RED}<${PR_BRIGHT_RED}<${PR_RESET} "
72+RED_END="${PR_RESET}${PR_BRIGHT_RED}>${PR_RESET}${PR_RED}>${PR_GREY}>${PR_RESET} "
73+GREEN_END="${PR_RESET}${PR_BRIGHT_GREEN}>${PR_RESET}${PR_GREEN}>${PR_GREY}>${PR_RESET} "
74+GREEN_BASE_START="${PR_RESET}${PR_GREY}>${PR_RESET}${PR_GREEN}>${PR_BRIGHT_GREEN}>${PR_RESET}"
75+GREEN_START_P1="${PR_RESET}${GREEN_BASE_START}${PR_RESET} "
76+DIVISION="${PR_RESET}${PR_RED} < ${PR_RESET}"
77+VCS_DIRTY_COLOR="${PR_RESET}${PR_YELLOW}"
78+Vcs_CLEAN_COLOR="${PR_RESET}${PR_GREEN}"
79+VCS_SUFIX_COLOR="${PR_RESET}${PR_RED}› ${PR_RESET}"
80+# ########## COLOR ###########
81+# ########## SVN ###########
82+ZSH_THEME_SVN_PROMPT_PREFIX="${PR_RESET}${PR_RED}‹svn:"
83+ZSH_THEME_SVN_PROMPT_SUFFIX=""
84+ZSH_THEME_SVN_PROMPT_DIRTY="${VCS_DIRTY_COLOR} ✘${VCS_SUFIX_COLOR}"
85+ZSH_THEME_SVN_PROMPT_CLEAN="${VCS_CLEAN_COLOR} ✔${VCS_SUFIX_COLOR}"
86+# ########## SVN ###########
87+# ########## GIT ###########
88+ZSH_THEME_GIT_PROMPT_PREFIX="${PR_RESET}${PR_RED}‹git:"
89+ZSH_THEME_GIT_PROMPT_SUFFIX=""
90+ZSH_THEME_GIT_PROMPT_DIRTY="${VCS_DIRTY_COLOR} ✘${VCS_SUFIX_COLOR}"
91+ZSH_THEME_GIT_PROMPT_CLEAN="${VCS_CLEAN_COLOR} ✔${VCS_SUFIX_COLOR}"
92+ZSH_THEME_GIT_PROMPT_ADDED="${PR_RESET}${PR_YELLOW} ✚${PR_RESET}"
93+ZSH_THEME_GIT_PROMPT_MODIFIED="${PR_RESET}${PR_YELLOW} ✹${PR_RESET}"
94+ZSH_THEME_GIT_PROMPT_DELETED="${PR_RESET}${PR_YELLOW} ✖${PR_RESET}"
95+ZSH_THEME_GIT_PROMPT_RENAMED="${PR_RESET}${PR_YELLOW} ➜${PR_RESET}"
96+ZSH_THEME_GIT_PROMPT_UNMERGED="${PR_RESET}${PR_YELLOW} ═${PR_RESET}"
97+ZSH_THEME_GIT_PROMPT_UNTRACKED="${PR_RESET}${PR_YELLOW} ✭${PR_RESET}"
98+# ########## GIT ###########
99+function precmd {
100+ #gets the fortune
101+ ps1_fortune () {
102+ #Choose from all databases, regardless of whether they are considered "offensive"
103+ fortune -a
104+ }