-
Notifications
You must be signed in to change notification settings - Fork 2
/
dot_zshenv
270 lines (254 loc) · 5.45 KB
/
dot_zshenv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# This file is sourced by all instances of Zsh and I want
# this config to be always available
command -v vim >/dev/null 2>&1 && export EDITOR=vim
command -v nvim >/dev/null 2>&1 && export EDITOR=nvim
[ -d $HOME/workspace/git.rootknecht.net/scripts ] && export PATH=$PATH:$HOME/workspace/git.rootknecht.net/scripts
[ -d $HOME/.local/bin ] && export PATH=$PATH:$HOME/.local/bin
[ -d $HOME/.local/share/nvim/mason/bin ] && export PATH=$PATH:$HOME/.local/share/nvim/mason/bin
[ -f $HOME/.shell/aliases ] && source $HOME/.shell/aliases
[ -f $HOME/.shell/funcs ] && source $HOME/.shell/funcs
# K9s
export K9S_CONFIG_DIR=~/.config/k9s/
# NNN
export NNN_OPTS=aidRU
export NNN_TRASH=1 # trash-cli
export NNN_PLUG='t:autojump;d:diffs;p:preview-tui'
export NNN_FIFO=/tmp/nnn.fifo
export SPLIT='v' # for vertical kitty splits
# Colored man pages
export LESS_TERMCAP_mb=$'\E[01;32m'
export LESS_TERMCAP_md=$'\E[01;32m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;47;34m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;36m'
export LESS=-r
export LEDGER_DIR=$HOME/data/finanzen/ledger/
export LEDGER_FILE=${LEDGER_DIR}main.ledger
export EXCLUDE_STRING=.git/*,node_modules/*,target/*,.idea/*,.vscode/*,.terraform/*,.gem/*,.cache,**/cache/*,**go/pkg/*,lib/*,bin/*,include/*
# fzf
# WARNING: fd is filtered by ~/.config/fd/ignore!
export FZF_COMPLETION_TRIGGER=',,'
# Use fd (https://github.com/sharkdp/fd) instead of the default find
# The first argument to the function ($1) is the base path to start traversal
_fzf_compgen_path() {
fd --hidden --follow . "$1"
}
# Use fd to generate the list for directory completion
_fzf_compgen_dir() {
fd --type d --hidden --follow . "$1"
}
# add support for ctrl+o to open selected file
export FZF_DEFAULT_OPTS="--bind='ctrl-o:execute:nvim {} > /dev/tty'"
# Preview files
export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'"
# Preview directories with tree
export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
command -v fd >/dev/null 2>&1 && export FZF_DEFAULT_COMMAND='fd --type file --follow --hidden'
command -v fd >/dev/null 2>&1 && export FZF_ALT_C_COMMAND='fd --type directory --follow --hidden'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
if [[ "$OSTYPE" =~ "darwin" ]]
then
export LC_CTYPE=UTF-8
export GPG_TTY=$(tty)
if [[ x"$KITTY_PID" == "x" ]]
then # not kitty
export TERMINAL=xterm
export TERM=xterm-256color
else
# not compatible with my ssh config to start tmux after connecting
# alias ssh='kitty +kitten ssh'
export TERMINAL=kitty
export TERM=xterm-kitty
fi
export BROWSER="open -a firefox"
fi
if [[ "$OSTYPE" =~ "linux" ]]
then
export BROWSER=firefox
export BROWSERCLI=lynx
export MAIL=/usr/bin/neomutt
# Fix libstdc++.so.6: cannot open shared object file: No such file or directory
export LD_LIBRARY_PATH=/nix/store/j134k1ncfn6gjfd2f5s1gz37170rch4h-gcc-11.3.0-lib/lib/
# basedir defaults, in case they're not already set up.
# http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
if [[ -z "$XDG_DATA_HOME" ]]; then
export XDG_DATA_HOME="$HOME/.local/share"
fi
if [[ -z "$XDG_CONFIG_HOME" ]]; then
export XDG_CONFIG_HOME="$HOME/.config"
fi
if [[ -z "$XDG_CACHE_HOME" ]]; then
export XDG_CACHE_HOME="$HOME/.cache"
fi
if [[ -z "$XDG_DATA_DIRS" ]]; then
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
fi
if [[ -z "$XDG_CONFIG_DIRS" ]]; then
export XDG_CONFIG_DIRS="/etc/xdg"
else
export XDG_CONFIG_DIRS="/etc/xdg:$XDG_CONFIG_DIRS"
fi
fi
export LF_ICONS="\
di=:\
fi=:\
ln=:\
or=:\
ex=:\
*.vimrc=:\
*.viminfo=:\
*.gitignore=:\
*.c=:\
*.cc=:\
*.clj=:\
*.coffee=:\
*.cpp=:\
*.css=:\
*.d=:\
*.dart=:\
*.erl=:\
*.exs=:\
*.fs=:\
*.go=:\
*.h=:\
*.hh=:\
*.hpp=:\
*.hs=:\
*.html=:\
*.java=:\
*.jl=:\
*.js=:\
*.json=:\
*.lua=:\
*.md=:\
*.php=:\
*.pl=:\
*.pro=:\
*.py=:\
*.rb=:\
*.rs=:\
*.scala=:\
*.ts=:\
*.vim=:\
*.cmd=:\
*.ps1=:\
*.sh=:\
*.bash=:\
*.zsh=:\
*.fish=:\
*.tar=:\
*.tgz=:\
*.arc=:\
*.arj=:\
*.taz=:\
*.lha=:\
*.lz4=:\
*.lzh=:\
*.lzma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