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