]> git.netwichtig.de Git - user/henk/vcsh/zsh.git/blob - .zshrc
tex stuff should look for a conf in my home
[user/henk/vcsh/zsh.git] / .zshrc
1 # zprof only makes sense at the very top
2 # zmodload zsh/zprof
3
4
5 # exports are usually independent and standalone
6 # so they can stay at the top
7
8 # where to write history
9 export HISTFILE=~/.zsh_history
10 export HISTSIZE=1000000000
11 export SAVEHIST=1000000000
12
13 export ANSIBLE_NOCOWS=1
14 export ANSIBLE_STRATEGY=mitogen_linear
15
16 export TEXMFCNF=${HOME}/.texlive:
17
18 # what is that for exactly? maybe taskwarrior? or timewarrior?
19 REPORTTIME=10
20
21 ## define word characters (for stuff like backward-word, forward-word, backward-kill-word,..)
22 ## these are NOT separators but chars considered part of a word
23 #WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' # the default
24
25 # zsh you-should-use
26 export YSU_MODE=ALL
27
28 # I want sbin executables available
29 export PATH=${PATH}:/usr/local/sbin:/sbin:/usr/sbin
30 export PATH=${PATH}:~/bin
31
32 # colors for newt/whiptail (for debconf, needrestart, etc.)
33 # works better with selenized colorscheme
34 # everything that seems irrelevant is set to brown
35 NEWT_COLORS=''
36 # foreground seems irrelevant
37 NEWT_COLORS="${NEWT_COLORS};root=brown,blue"
38 # text in the root window
39 NEWT_COLORS="${NEWT_COLORS};roottext=yellow,blue"
40
41 # box/window/button shadows
42 NEWT_COLORS="${NEWT_COLORS};shadow=brown,black"
43
44 # boxes/windows themselves
45 NEWT_COLORS="${NEWT_COLORS};window=brown,lightgray"
46 # box/window titles
47 NEWT_COLORS="${NEWT_COLORS};title=yellow,lightgray"
48 # box/window borders
49 NEWT_COLORS="${NEWT_COLORS};border=gray,lightgray"
50
51 # full buttons
52 NEWT_COLORS="${NEWT_COLORS};button=black,red"
53 # compact buttons
54 NEWT_COLORS="${NEWT_COLORS};compactbutton=black,lightgray"
55 # selected/active button
56 NEWT_COLORS="${NEWT_COLORS};actbutton=green,gray"
57
58 # checkbox itself and text
59 NEWT_COLORS="${NEWT_COLORS};checkbox=black,blue"
60 # selection marker for checkbox
61 NEWT_COLORS="${NEWT_COLORS};actcheckbox=yellow,gray"
62
63 # TODO FIXME: no clue what that is
64 NEWT_COLORS="${NEWT_COLORS};entry=yellow,brown"
65 # TODO FIXME: no clue what that is
66 NEWT_COLORS="${NEWT_COLORS};disentry=brown,yellow"
67
68 # TODO FIXME: no clue what that is
69 NEWT_COLORS="${NEWT_COLORS};label=yellow,red"
70
71 # unselected entries in menus
72 NEWT_COLORS="${NEWT_COLORS};listbox=lightgray,gray"
73 # selected entries in menus
74 NEWT_COLORS="${NEWT_COLORS};actsellistbox=yellow,blue"
75 # TODO FIXME: no clue what that is
76 NEWT_COLORS="${NEWT_COLORS};actlistbox=brown,red"
77 # TODO FIXME: no clue what that is
78 NEWT_COLORS="${NEWT_COLORS};sellistbox=black,brown"
79
80 NEWT_COLORS="${NEWT_COLORS};textbox=black,lightgray"
81 NEWT_COLORS="${NEWT_COLORS};acttextbox=brown,green"
82
83 # TODO FIXME: no clue what that is
84 NEWT_COLORS="${NEWT_COLORS};helpline=yellow,brown"
85
86 # probably for gauges
87 NEWT_COLORS="${NEWT_COLORS};emptyscale=red"
88 NEWT_COLORS="${NEWT_COLORS};fullscale=blue"
89
90
91 # black
92 # darkgray
93 # brown
94 # yellow
95 #
96 # blue
97 # cyan
98 # gray
99 # green
100 # magenta
101 # red
102 #
103 # lightblue
104 # lightcyan
105 # lightgray
106 # lightgreen
107 # lightmagenta
108 # lightred
109
110
111 # where zsh looks for functions
112 fpath=(~/.zsh_functions $fpath)
113
114
115 # hashed directories are usually independent and standalone
116 # so they can stay at the top
117 hash -d diary=~/Data/henksfiles/workinprogress/Dokumente/diary
118 hash -d lifedocs=~/Data/henksfiles/workinprogress/Dokumente/Leben
119 hash -d bewerbung=~/Data/personal/henk/workinprogress/Dokumente/Arbeit/bewerbung
120 hash -d rezepte=~/Data/henksfiles/workinprogress/Dokumente/rezepte/cuisine
121 hash -d templates=~/Data/henksfiles/workinprogress/templates
122 hash -d gitignore=~/Data/public/software/gitignore
123 hash -d doc=/usr/share/doc
124 hash -d TODO=~/Data/henksfiles/TODO/
125 hash -d fortunes=~/Data/henksfiles/workinprogress/Dokumente/fortunes/
126
127
128 # aliases are usually independent and standalone
129 source ~/.zsh_aliases
130 # TODO break this up or make functions or get rid?
131 source ~/.zsh_qemu
132
133
134 # load plugin manager after all 'static' stuff is done
135 # source ~/Data/public/software/zinit/zinit.zsh
136 source "${HOME}/.zgenom/zgenom.zsh"
137 # Check for plugin and zgenom updates every 7 days
138 # This does not increase the startup time.
139 zgenom autoupdate
140
141
142 # mostly static stuff, env vars
143 # zinit load 'https://github.com/joel-porquet/zsh-dircolors-solarized'
144 # zinit load "https://github.com/greymd/tmux-xpanes"
145 zgenom load 'https://github.com/joel-porquet/zsh-dircolors-solarized'
146 zgenom load "https://github.com/greymd/tmux-xpanes"
147
148
149 # options are usually independent and standalone
150 # so they can stay at the top
151 setopt AUTO_CD
152 setopt CHASE_LINKS
153
154 setopt AUTO_NAME_DIRS
155
156 setopt BRACE_CCL
157 setopt EXTENDED_GLOB
158 setopt MARK_DIRS
159 setopt NUMERIC_GLOB_SORT
160 setopt RC_EXPAND_PARAM
161 #setopt WARN_CREATE_GLOBAL
162 setopt GLOB_DOTS
163
164 # remove previous entries from history
165 setopt HIST_IGNORE_ALL_DUPS
166 # do not write lines starting with a space to history file
167 setopt HIST_IGNORE_SPACE
168 # Remove superfluous blanks
169 setopt HIST_REDUCE_BLANKS
170 # expand history expansion for verification
171 setopt HIST_VERIFY
172 # save timestamp and runtime as well
173 setopt EXTENDED_HISTORY
174 # write line to history file when finished, not when started, to have correct runtime
175 setopt INC_APPEND_HISTORY_TIME
176
177 setopt NO_CLOBBER
178 setopt CORRECT
179 setopt CORRECT_ALL
180 #unsetopt NOMATCH
181 setopt PRINT_EXIT_VALUE
182
183 setopt AUTO_CONTINUE
184 setopt NO_BG_NICE
185 # display PID when suspending processes as well
186 setopt LONG_LIST_JOBS
187 # Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
188 setopt NOTIFY
189 # Whenever  a  command completion or spelling correction is attempted, make sure the entire command path is hashed first.  This makes the first completion slower but avoids false reports of spelling errors.
190 setopt HASH_LIST_ALL
191 # If unset, the cursor is set to the end of the word if completion is started. Otherwise it stays there and completion is done from both ends.
192 setopt COMPLETE_IN_WORD
193 # use zsh field splitting
194 setopt NO_SH_WORD_SPLIT
195 # unset parameters should cause an error
196 # CONFLICTS WITH ZINIT
197 # CONFLICTS WITH ZGENOM
198 # setopt NO_UNSET
199
200
201 # load before completion system initialization
202 # zinit load 'https://github.com/zsh-users/zsh-completions'
203 zgenom load 'https://github.com/zsh-users/zsh-completions'
204
205 # initialize completion system before loading plugins and external configs
206 source ~/.zsh_comprc
207
208
209 # TODO reconsider this
210 # source /usr/share/autojump/autojump.sh
211
212
213 # autoload all functions defined by me
214 # since only filenames are required we
215 # * follow symlinks
216 # * work only on plainfiles
217 # * take only the filename part without dir
218 autoload ~/.zsh_functions/[^_]*(-.:t)
219
220
221 autoload -Uz vcs_info
222 autoload -Uz zcalc
223 autoload -Uz zargs
224
225
226 # spawn editor on current command line
227 autoload -Uz edit-command-line
228 zle -N edit-command-line
229 bindkey -M vicmd '^X^E' edit-command-line
230 bindkey -M viins '^X^E' edit-command-line
231
232
233 #this mainly sets vars, binds keys, does zle stuff
234 # zinit load 'https://github.com/laurenkt/zsh-vimto'
235 zgenom load 'https://github.com/laurenkt/zsh-vimto'
236
237 # functions and an autoload, should be fine here
238 # zinit load 'https://github.com/MichaelAquilina/zsh-you-should-use'
239 zgenom load 'https://github.com/MichaelAquilina/zsh-you-should-use'
240
241
242 # source ~/.zsh_taskwarrior
243 # source ~/.zsh_functions
244 # source ~/.zsh_functions_media
245 # source ~/.zsh_functions_taskwarrior
246
247
248 # TODO break this up
249 source ~/.zsh_local
250
251 # TODO break this up
252 for f in ~/.env_*(N)
253 do
254         source $f
255 done
256
257
258 typeset -U path
259
260 #zle -N zle-line-init
261 #zle -N zle-keymap-select
262
263
264 # keybindings might have been changed by plugins, etc.
265 # so they go more to the bottom
266
267
268 # should probably be closer to the bottom than the top?
269 # zinit load 'https://github.com/nojhan/liquidprompt'
270 zgenom load 'https://github.com/nojhan/liquidprompt'
271
272
273 # needs to be loaded close to the end because it hooks into other stuff
274 # see https://github.com/zsh-users/zsh-syntax-highlighting
275 source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
276
277
278 # commands to run after initialization is complete
279 #task awaiting
280 cat ~/.motd
281 # zprof