1 # zprof only makes sense at the very top
5 # exports are usually independent and standalone
6 # so they can stay at the top
8 # where to write history
9 export HISTFILE=~/.zsh_history
10 export HISTSIZE=1000000000
11 export SAVEHIST=1000000000
13 export ANSIBLE_NOCOWS=1
14 export ANSIBLE_STRATEGY=mitogen_linear
16 export TEXMFCNF=${HOME}/.texlive:
18 export FZF_DEFAULT_COMMAND='fdfind --type f'
20 # what is that for exactly? maybe taskwarrior? or timewarrior?
23 ## define word characters (for stuff like backward-word, forward-word, backward-kill-word,..)
24 ## these are NOT separators but chars considered part of a word
25 #WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' # the default
30 # I want sbin executables available
31 export PATH=${PATH}:/usr/local/sbin:/sbin:/usr/sbin
32 export PATH=${PATH}:~/bin
34 # colors for newt/whiptail (for debconf, needrestart, etc.)
35 # works better with selenized colorscheme
36 # everything that seems irrelevant is set to brown
38 # foreground seems irrelevant
39 NEWT_COLORS="${NEWT_COLORS};root=brown,blue"
40 # text in the root window
41 NEWT_COLORS="${NEWT_COLORS};roottext=yellow,blue"
43 # box/window/button shadows
44 NEWT_COLORS="${NEWT_COLORS};shadow=brown,black"
46 # boxes/windows themselves
47 NEWT_COLORS="${NEWT_COLORS};window=brown,lightgray"
49 NEWT_COLORS="${NEWT_COLORS};title=yellow,lightgray"
51 NEWT_COLORS="${NEWT_COLORS};border=gray,lightgray"
54 NEWT_COLORS="${NEWT_COLORS};button=black,red"
56 NEWT_COLORS="${NEWT_COLORS};compactbutton=black,lightgray"
57 # selected/active button
58 NEWT_COLORS="${NEWT_COLORS};actbutton=green,gray"
60 # checkbox itself and text
61 NEWT_COLORS="${NEWT_COLORS};checkbox=black,blue"
62 # selection marker for checkbox
63 NEWT_COLORS="${NEWT_COLORS};actcheckbox=yellow,gray"
65 # TODO FIXME: no clue what that is
66 NEWT_COLORS="${NEWT_COLORS};entry=yellow,brown"
67 # TODO FIXME: no clue what that is
68 NEWT_COLORS="${NEWT_COLORS};disentry=brown,yellow"
70 # TODO FIXME: no clue what that is
71 NEWT_COLORS="${NEWT_COLORS};label=yellow,red"
73 # unselected entries in menus
74 NEWT_COLORS="${NEWT_COLORS};listbox=lightgray,gray"
75 # selected entries in menus
76 NEWT_COLORS="${NEWT_COLORS};actsellistbox=yellow,blue"
77 # TODO FIXME: no clue what that is
78 NEWT_COLORS="${NEWT_COLORS};actlistbox=brown,red"
79 # TODO FIXME: no clue what that is
80 NEWT_COLORS="${NEWT_COLORS};sellistbox=black,brown"
82 NEWT_COLORS="${NEWT_COLORS};textbox=black,lightgray"
83 NEWT_COLORS="${NEWT_COLORS};acttextbox=brown,green"
85 # TODO FIXME: no clue what that is
86 NEWT_COLORS="${NEWT_COLORS};helpline=yellow,brown"
89 NEWT_COLORS="${NEWT_COLORS};emptyscale=red"
90 NEWT_COLORS="${NEWT_COLORS};fullscale=blue"
114 # where zsh looks for functions
115 fpath=(~/.zsh_functions $fpath)
118 # hashed directories are usually independent and standalone
119 # so they can stay at the top
120 hash -d diary=~/Data/henksfiles/workinprogress/Dokumente/diary
121 hash -d lifedocs=~/Data/henksfiles/workinprogress/Dokumente/Leben
122 hash -d bewerbung=~/Data/personal/henk/workinprogress/Dokumente/Arbeit/bewerbung
123 hash -d rezepte=~/Data/henksfiles/workinprogress/Dokumente/rezepte/cuisine
124 hash -d templates=~/Data/henksfiles/workinprogress/templates
125 hash -d gitignore=~/Data/public/software/gitignore
126 hash -d doc=/usr/share/doc
127 hash -d TODO=~/Data/henksfiles/TODO/
128 hash -d fortunes=~/Data/henksfiles/workinprogress/Dokumente/fortunes/
131 # aliases are usually independent and standalone
132 source ~/.zsh_aliases
133 # TODO break this up or make functions or get rid?
137 # load plugin manager after all 'static' stuff is done
138 # source ~/Data/public/software/zinit/zinit.zsh
139 source "${HOME}/.zgenom/zgenom.zsh"
140 # Check for plugin and zgenom updates every 7 days
141 # This does not increase the startup time.
145 # mostly static stuff, env vars
146 # zinit load 'https://github.com/joel-porquet/zsh-dircolors-solarized'
147 # zinit load "https://github.com/greymd/tmux-xpanes"
148 zgenom load 'https://github.com/joel-porquet/zsh-dircolors-solarized'
149 zgenom load "https://github.com/greymd/tmux-xpanes"
152 # options are usually independent and standalone
153 # so they can stay at the top
157 setopt AUTO_NAME_DIRS
162 setopt NUMERIC_GLOB_SORT
163 setopt RC_EXPAND_PARAM
164 #setopt WARN_CREATE_GLOBAL
167 # remove previous entries from history
168 setopt HIST_IGNORE_ALL_DUPS
169 # do not write lines starting with a space to history file
170 setopt HIST_IGNORE_SPACE
171 # Remove superfluous blanks
172 setopt HIST_REDUCE_BLANKS
173 # expand history expansion for verification
175 # save timestamp and runtime as well
176 setopt EXTENDED_HISTORY
177 # write line to history file when finished, not when started, to have correct runtime
178 setopt INC_APPEND_HISTORY_TIME
184 setopt PRINT_EXIT_VALUE
188 # display PID when suspending processes as well
189 setopt LONG_LIST_JOBS
190 # Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
192 # 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.
194 # 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.
195 setopt COMPLETE_IN_WORD
196 # use zsh field splitting
197 setopt NO_SH_WORD_SPLIT
198 # unset parameters should cause an error
199 # CONFLICTS WITH ZINIT
200 # CONFLICTS WITH ZGENOM
204 # load before completion system initialization
205 # zinit load 'https://github.com/zsh-users/zsh-completions'
206 zgenom load 'https://github.com/zsh-users/zsh-completions'
208 # initialize completion system before loading plugins and external configs
212 # TODO reconsider this
213 # source /usr/share/autojump/autojump.sh
216 # autoload all functions defined by me
217 # since only filenames are required we
219 # * work only on plainfiles
220 # * take only the filename part without dir
221 autoload ~/.zsh_functions/[^_]*(-.:t)
224 autoload -Uz vcs_info
229 # spawn editor on current command line
230 autoload -Uz edit-command-line
231 zle -N edit-command-line
232 bindkey -M vicmd '^X^E' edit-command-line
233 bindkey -M viins '^X^E' edit-command-line
236 #this mainly sets vars, binds keys, does zle stuff
237 # zinit load 'https://github.com/laurenkt/zsh-vimto'
238 zgenom load 'https://github.com/laurenkt/zsh-vimto'
240 # functions and an autoload, should be fine here
241 # zinit load 'https://github.com/MichaelAquilina/zsh-you-should-use'
242 zgenom load 'https://github.com/MichaelAquilina/zsh-you-should-use'
245 # source ~/.zsh_taskwarrior
246 # source ~/.zsh_functions
247 # source ~/.zsh_functions_media
248 # source ~/.zsh_functions_taskwarrior
263 #zle -N zle-line-init
264 #zle -N zle-keymap-select
267 # keybindings might have been changed by plugins, etc.
268 # so they go more to the bottom
271 # should probably be closer to the bottom than the top?
272 # zinit load 'https://github.com/nojhan/liquidprompt'
273 zgenom load 'https://github.com/nojhan/liquidprompt'
276 # needs to be loaded close to the end because it hooks into other stuff
277 # see https://github.com/zsh-users/zsh-syntax-highlighting
278 source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
280 source /usr/share/doc/fzf/examples/key-bindings.zsh
281 source /usr/share/doc/fzf/examples/completion.zsh
283 # Use fd (https://github.com/sharkdp/fd) instead of the default find
284 # command for listing path candidates.
285 # - The first argument to the function ($1) is the base path to start traversal
286 # - See the source code (completion.{bash,zsh}) for the details.
287 _fzf_compgen_path() {
288 fdfind --hidden --follow --exclude ".git" . "$1"
291 # Use fd to generate the list for directory completion
293 fdfind --type d --hidden --follow --exclude ".git" . "$1"
296 # commands to run after initialization is complete