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"
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