zbell built into the prompt
[zsh.git] / .zsh / zshenv.local.sample
1 # -*- mode: sh;-*-
2
3 ## This file contains settings local to the system. Note that this is
4 ## read very early, so you can not depend on anything that is set
5 ## somewhere in this zsh config. If you want that, use the file
6 ## ${ZDOTDIR}/zshlate or $ZDOTDIR/zlogin.
7 ## zlogin is read whenever the shell is a login shell, zshlate is
8 ## used on all interactive shells.
9
10 ## The contents here consist of a mix of variables and zstyle lines.
11 ## Feel free to add your own at the bottom.
12
13 ## Output some more information during zshell startup
14 DEBUG=${DEBUG:-no}
15
16 ## The following entries are added to the PATH variable, in front of
17 ## anything else. Non-existing directories are ignored, so you can
18 ## list more than the current machine has.
19 ## If you don't want any additions, make it an empty array
20 typeset -a lpath
21 lpath=(
22 "$HOME/bin"
23 /sbin
24 /usr/sbin
25 /srv/qa.debian.org/mia
26 )
27
28 ## Same goes for man and info path
29 typeset -a lmanpath
30 lmanpath=(
31 ~/man
32 ~/local/share/man
33 )
34
35 ########################################################################
36 ## The following styles are defined. ##
37 ## Values shown are the defaults taken if the style is unset ##
38 ########################################################################
39
40 ## Set a sane umask
41 # zstyle ':ganneff:config' umask '022'
42
43 ## check every 5 min for login/logout activity
44 # zstyle ':ganneff:config' LOGCHECK 300
45
46 ## The format of login/logout reports
47 # zstyle ':ganneff:config' WATCHFMT '%n %a %l from %m at %t.'
48
49 ## Do you want to have zsh compile your startup files?
50 ## It may make it faster. It may make it slower. Check yourself.
51 ## This uses zrecompile, so changed files are automagically detected
52 # zstyle ':ganneff:config' zrecompile false
53
54 ## The two variables COLORS and LINEDRAW, by default, are set according
55 ## to the capabilities of your terminal. COLORS if it supports colors
56 ## (tput colors > 0), ## LINEDRAW, who would have thought, if it can
57 ## draw "nice-looking" lines (tput acsc exists and NOT linux console).
58 ## If you want to overwrite that detection, enable the following styles.
59 # zstyle ':ganneff:config' COLORS false
60 # zstyle ':ganneff:config' LINEDRAW true/false
61
62 ## Store the dirstack between sessions and restore it
63 ## There are two ways: The first, dirpersist, will restore it in
64 ## a way that puts your new shell into the directory you quit your
65 ## last. The other way, dirstack, will restore the stack, but not
66 ## change the directory your shell starts in (so usually it will be ~).
67 ## Value is dirpersist or dirstack
68 zstyle ':ganneff:config' dirstackhandling dirpersist
69
70 ## Maximum number of events stored in the history file
71 ## HISTSIZE is set to 1.10 times the size of this, to have the
72 ## difference as a cushion for saving duplicated history events, so dupe
73 ## expiration can happen without killing (old) unique entries
74 # zstyle ':ganneff:config' SAVEHIST 50000
75
76 ## The preferred pager
77 # zstyle ':ganneff:config' PAGER "$(which less)"
78
79 ## some options for less
80 # zstyle ':ganneff:config' LESS '-X -R -f -j 3'
81
82 ## use solarized colorscheme for ls?
83 # zstyle ':ganneff:config' solarizedls true
84
85 ## on very wide displays it is annoying to have too wide manpages.
86 ## set to 0 if you want them really wide
87 # zstyle ':ganneff:config' MANWIDTH 0
88
89 ## The format of process time reports with the time builtin.
90 # zstyle ':ganneff:config' TIMEFMT "%J %U user %S system %P cpu %*E total | Mem: %M kb max"
91
92 ## Report time statistics if command runs longer than 30 seconds
93 ## (combined user/system execution times)
94 # zstyle ':ganneff:config' REPORTTIME 30
95
96 ## Preferred list of locales to set. The first found is taken, you
97 ## should end with C in case there is no locale configured.
98 #zstyle ':ganneff:config' locales "LANG de_DE.utf8 en_GB.utf8 C.UTF-8 C" \
99 # "LC_MESSAGES en_GB.utf8 de_DE.utf8 C.UTF-8 C"
100
101 ## Use zsh syntax hilighting (input line coloring)
102 # zstyle ':ganneff:config' zsh-syntax-hilight true
103
104 ## Preferred list of editors to use as $EDITOR.
105 ## If you want arguments to the command, give them inside ""
106 # zstyle ':ganneff:config' editors "emacs-snapshot -Q -D -nw" \
107 # "emacs24 -Q -D -nw" \
108 # "emacs23 -Q -D -nw" \
109 # "emacs22 -Q -D -nw" \
110 # mcedit \
111 # vim vi \
112 # editor
113
114 ## Want to (try) using emacsclient?
115 # zstyle ':ganneff:config' emacsclient true
116
117 ## Want to have a fortune at zsh start?
118 # zstyle ':ganneff:config' fortune true
119
120 ## Want to see how long it (roughly) took to load?
121 # zstyle ':ganneff:config' starttime false
122
123 ## Should we use lessfile or lesspipe (if installed)?
124 ## Difference is in the handling, see the manpages for details, but
125 ## one of them uses pipes and one files to hand their output to less.
126 ## Which results in one of them having you waiting until they are finished,
127 ## while the other shows you results fast - but then doesn't let less show
128 ## you how far (in %) you are in the output.
129 ## Defaults to lesspipe
130 # zstyle ':ganneff:config' lesstool lesspipe
131
132 # We have a little function "path". Call that and it displays your path
133 # variable nicely colored. Call it with argument (say, fpath) and it does
134 # it for that path. Define the colors and elements to style in this array
135 # (or live with defaults).
136 # Actually it can be used for any array, just set the pcolor style with the
137 # right matches and the color for it...
138 # zstyle ':ganneff:config' pcolor /usr green \
139 # /bin blue \
140 # /opt cyan \
141 # /sbin magenta \
142 # /local yellow \
143 # /zsh white
144
145
146 ########################################################################
147 ### Prompt setup ###
148 ## use vcs_info in prompt
149 zstyle ':prompt:ganneff' vcs_info true
150
151 ## use defaults set by me?
152 zstyle ':prompt:ganneff' set_vcs_info_defaults true
153
154 ## if set_vcs_info_defaults is false, you may want to enable some of the
155 ## following lines or whichever combination you like of it. See the
156 ## vcs_info documentation for what they mean.
157 # zstyle ':vcs_info:*' max-exports 1
158 # zstyle ':vcs_info:*' use-prompt-escapes
159 # zstyle ':vcs_info:*' use_simple
160 # zstyle ':vcs_info:*' stagedstr "!"
161 # zstyle ':vcs_info:*' unstagedstr "?"
162 # zstyle ':vcs_info:*' check-for-changes true
163
164 ## change vcs_info formats for the prompt
165 # zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat "${PR_YELLOW}%b%{${PR_RED}%}:${PR_YELLOW}%r${PR_NO_COLOR}"
166 # zstyle ':vcs_info:*' formats "(${PR_YELLOW}%s${PR_NO_COLOR})-[${PR_GREEN}%b${PR_NO_COLOR}]%m%u%c "
167 # zstyle ':vcs_info:*' actionformats "(${PR_YELLOW}%s${PR_NO_COLOR})-[${PR_GREEN}%b${PR_NO_COLOR}-${PR_RED}(%a)${PR_NO_COLOR}]%m%u%c "
168 # zstyle ':vcs_info:*' disable cdv darcs mtn tla hg fossil p4
169
170 ## Similar to the zbell function included, this lets the prompt do it.
171 ## That way one can not forget to activate it. But as one might not want
172 ## it each and every time when a command runs a little longer, the
173 ## timeout here should be really high. I recommend something like 300 or
174 ## 600. Set it to 0 to turn this feature off entirely, default is 600
175 # zstyle ':prompt:ganneff' longbell 600
176
177 ## The following list of commands is ignored, no bell is output if it
178 ## runs too long. $EDITOR, $PAGER, man and maybe ssh might be good
179 ## candidates and as such are the default. If you put variables here,
180 ## we will additionally expand them at prompt setup time and so keep
181 ## both, the variable itself as well as the expanded command ignored.
182 # zstyle ':prompt:ganneff' bell_ignore '$EDITOR' '$PAGER' sleep man ssh
183
184 ## Use color in prompt.
185 ## COLORS is defined as true/false in 01_Terminfo.zsh depending on
186 ## capabilities of the terminal. If unset then defined by those.
187 # zstyle ':prompt:ganneff' colors true/false
188
189 ## If drawing lines, make them "nice looking".
190 ## LINEDRAW is defined as true/false in 01_Terminfo.zsh depending on
191 ## capabilities of the terminal. If unset then defined by those.
192 #zstyle ':prompt:ganneff' nicelines true/false
193
194 ## Populate prompt info item "battery"
195 ## If `none' then no battery function at all.
196 ## If either `ibam' or `acpi' then use those tools to gather
197 ## the current battery level.
198 zstyle ':prompt:ganneff' battery none
199
200 ## If true (default), use a right side prompt
201 #zstyle ':prompt:ganneff:right:setup' use-rprompt true
202
203 ## Define list of items for the prompt. See prompt -h ganneff
204 ## for more information.
205 # zstyle ':prompt:ganneff:left:full:setup' items \
206 # ulcorner line openparentheses user at host colon pts closeparentheses line history \
207 # line shell-level line flexline openparentheses path closeparentheses line urcorner newline \
208 # llcorner line rc openparentheses time closeparentheses line vcs line change-root pipe space
209 # zstyle ':prompt:ganneff:right:full:setup' items \
210 # pipe line openparentheses date closeparentheses line lrcorner
211 # zstyle ':prompt:ganneff:left:small:setup' items \
212 # ulcorner line openparentheses user at host closeparentheses line openparentheses path closeparentheses newline \
213 # llcorner line rc openparentheses time closeparentheses line vcs line pipe space
214
215 ## Override the token of an item
216 zstyle ':prompt:ganneff:*:items:date' token '%D{%Y-%m-%d [d:%j/w:%V]}'
217
218 # Example of an extra defined item.
219 # zstyle ':prompt:ganneff:extra:ganneff' pre '${PR_RED}'
220 # zstyle ':prompt:ganneff:extra:ganneff' post '${PR_NO_COLOR}'
221 # zstyle ':prompt:ganneff:extra:ganneff' token '$BLABLA'
222 # zstyle ':prompt:ganneff:extra:ganneff' precmd jj_blabla