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