forked from LukeSmithxyz/voidrice
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.profile
382 lines (320 loc) · 11.3 KB
/
.profile
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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
#!/bin/sh
# ~/.profile
# Profile file. Runs on login. Environmental variables are set here.
export SOURCED_DOT_PROFILE=1
# Get default LARBS WM from ~/.local/share/larbs/wm
export LARBSWM="$(cat ~/.local/share/larbs/wm 2>/dev/null)" &&
[ "$LARBSWM" = "dwm" ] || export LARBSWM="i3"
# Adds `~/.local/bin/` and all subdirectories to $PATH
export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
# export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}" # TODO merge investigate
# unsetopt PROMPT_SP # TODO merge intestigate
export PATH="$PATH:${XDG_DATA_HOME:-$HOME/.local/share}/cargo/bin"
export PATH="$PATH:$HOME/go/bin"
export PATH="$PATH:$HOME/.dotnet/tools"
export PATH="$PATH:/home/kipras/builds/DataGrip-2019.3.2/bin" # WE'VE REVERSELY FALLEN FOR THE MEME BOYZ
export PATH="$PATH:/opt/resolve/bin"
export PATH="$PATH:$HOME/.cabal/bin:$HOME/.ghcup/bin"
export PATH="$PATH:/opt/depot_tools"
export PATH="$PATH:$HOME/.emacs.d/bin"
export PATH="$PATH:$HOME/.mozbuild/git-cinnabar"
export PATH="$PATH:$HOME/forkprojects/boomer"
# Default programs:
export EDITOR="nvim"
export REACT_EDITOR="vscodium"
export SUDO_EDITOR="vi"
export TERMINAL="st"
# export TERMINAL="alacritty"
export BROWSER="firefox-developer-edition"
export READER="zathura"
export FILE="lf"
export STATUSBAR="${LARBSWM}blocks"
# ~/ Clean-up:
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
#export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
export WAKATIME_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/wakatime"
export PLATFORMIO_CORE_DIR="$HOME/.config/platformio"
export BIB="$HOME/Documents/LaTeX/uni.bib"
export REFER="$HOME/Documents/referbib"
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
export LESSHISTFILE="-"
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/inputrc"
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc"
#export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg"
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
export WEECHAT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/weechat"
export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config"
export ELECTRUMDIR="${XDG_DATA_HOME:-$HOME/.local/share}/electrum"
export DOTNET_CLI_TELEMETRY_OPTOUT=1 # https://wiki.archlinux.org/index.php/.NET_Core#Telemetry
# Other program settings:
export DICS="/usr/share/stardict/dic/"
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
export LESS=-R
#export LESSHISTFILE="$HOME/.cache/less/history"
export LESSHISTFILE="-"
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
export LESS_TERMCAP_md="$(printf '%b' '[1;36m')"
export LESS_TERMCAP_me="$(printf '%b' '[0m')"
export LESS_TERMCAP_so="$(printf '%b' '[01;44;33m')"
export LESS_TERMCAP_se="$(printf '%b' '[0m')"
export LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
# This is the list for lf icons:
export LF_ICONS="di=📁:\
fi=📃:\
tw=🤝:\
ow=📂:\
ln=⛓:\
or=❌:\
ex=🎯:\
*.txt=✍:\
*.mom=✍:\
*.me=✍:\
*.ms=✍:\
*.png=🖼:\
*.webp=🖼:\
*.ico=🖼:\
*.jpg=📸:\
*.jpe=📸:\
*.jpeg=📸:\
*.gif=🖼:\
*.svg=🗺:\
*.tif=🖼:\
*.tiff=🖼:\
*.xcf=🖌:\
*.html=🌎:\
*.xml=📰:\
*.gpg=🔒:\
*.css=🎨:\
*.pdf=📚:\
*.djvu=📚:\
*.epub=📚:\
*.csv=📓:\
*.xlsx=📓:\
*.tex=📜:\
*.md=📘:\
*.r=📊:\
*.R=📊:\
*.rmd=📊:\
*.Rmd=📊:\
*.m=📊:\
*.mp3=🎵:\
*.opus=🎵:\
*.ogg=🎵:\
*.m4a=🎵:\
*.flac=🎼:\
*.wav=🎼:\
*.mkv=🎥:\
*.mp4=🎥:\
*.webm=🎥:\
*.mpeg=🎥:\
*.avi=🎥:\
*.mov=🎥:\
*.mpg=🎥:\
*.wmv=🎥:\
*.m4b=🎥:\
*.flv=🎥:\
*.zip=📦:\
*.rar=📦:\
*.7z=📦:\
*.tar.gz=📦:\
*.z64=🎮:\
*.v64=🎮:\
*.n64=🎮:\
*.gba=🎮:\
*.nes=🎮:\
*.gdi=🎮:\
*.1=ℹ:\
*.nfo=ℹ:\
*.info=ℹ:\
*.log=📙:\
*.iso=📀:\
*.img=📀:\
*.bib=🎓:\
*.ged=👪:\
*.part=💔:\
*.torrent=🔽:\
*.jar=♨:\
*.java=♨:\
"
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ] && setsid -f "$HOME/.local/bin/shortcuts" >/dev/null 2>&1
# xampp
export PATH="$PATH:/opt/lampp"
export PATH="$PATH:$HOME/.local/bin"
# source some secrets
[ -f "$HOME/.secret" ] && . "$HOME/.secret"
# sourcemod / sourcepawn
export PATH="$PATH:$HOME/.local/share/sourcemod/addons/sourcemod/scripting"
# nosqlclient (for mongo)
export MONGO_URL="/usr/bin/mongo"
# deno
export DENO_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/deno"
export DENO_INSTALL_ROOT="$DENO_DIR/bin"
# snap
export PATH="$PATH:/var/lib/snapd/snap/bin"
# emacs
export DOOMDIR="${XDG_CONFIG_HOME:-$HOME/.config}/doom"
# mozilla (firefox etc)
export MOZCONFIG="$HOME/.config/mozilla/mozconfig"
# man, man-db, cppman
# https://github.com/aitjcize/cppman/issues/84#issuecomment-763265258
## export MANPATH="${XDG_DATA_HOME}/man"
# disable emoji in minikube
export MINIKUBE_IN_STYLE=false
#k8s
# kubectl plugins (originally wanted https://github.com/kubernetes-sigs/krew):
export PATH="${PATH}:${HOME}/.krew/bin"
# for kubectl, don't forget exporting the config filepath:
# export KUBECONFIG=~/.kube/k8s-2-fra-2-live.config
# before running the command, such as 'kubectl get pods'
#
# DBs
export KEEPASS_DB="$HOME/private/keepassxc-passwords.kdbx"
# work
export PIPEDRIVE_GIT_DIR="$HOME/wagie"
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
export PUPPETEER_EXECUTABLE_PATH="$(which chromium)"
# TODO change when PR lands
export XBAR_PLUGIN_DIR="$HOME/Library/Application Support/xbar/plugins"
# https://stackoverflow.com/a/18434831
case "$OSTYPE" in
solaris*) echo "SOLARIS" ;;
darwin*)
# echo "OSX"
# homebrew env
export HOMEBREW_NO_ANALYTICS=1
# update via: "/opt/homebrew/bin/brew shellenv"
export HOMEBREW_PREFIX="/opt/homebrew"
export HOMEBREW_CELLAR="/opt/homebrew/Cellar"
export HOMEBREW_REPOSITORY="/opt/homebrew"
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:"
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}"
# "n" prefix on M1.
# on intel macs, would be "/usr/local/" or "~/.local/share".
# is needed so that won't need `sudo` for `n` / `npm`
export N_PREFIX="$HOMEBREW_PREFIX"
# begin load nvm
export NVM_DIR="$HOME/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# end load nvm
# (see also ~/.zshrc)
if command -v "/usr/local/bin/ssh-askpass" &>/dev/null; then
export SUDO_ASKPASS="/usr/local/bin/ssh-askpass"
fi
# BEGIN PYTHON
# do manually:
# brew install pyenv
# pyenv install 3.9.7 (atm)
# pyenv global 3.9.7
# restart
#export PATH="/usr/local/opt/python/libexec/bin:$PATH"
#export PATH="$PATH:$HOME/Library/Python/3.8/bin"
#export PATH="$PATH:/usr/local/opt/python@3.9/libexec/bin"
export PATH="$PATH:$HOME/Library/Python/3.9/bin"
# https://docs.brew.sh/Homebrew-and-Python#site-packages-and-the-pythonpath
#export PYTHONPATH="$(brew --prefix)/lib/python3.9/site-packages:$PYTHONPATH"
# END PYTHON
# see https://stackoverflow.com/a/57973942/9285308
# make GNU commands available
export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
# more gnu commands
export PATH="$HOMEBREW_PREFIX/opt/gnu-sed/libexec/gnubin:$PATH"
# brew install gnu-time
# gtime -> just "time"
#
# needed for expected time calculation in .zshrc,
# just better compat w/ linux in general
#
# export PATH="/usr/local/opt/gnu-time/libexec/gnubin:$PATH"
#export PATH="/Applications/Firefox Developer Edition.app/Contents/MacOS/:$PATH"
export BROWSER="/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox" # additional escape characters apparently still needed because of later evaluation
#export PATH="/Applications/Google Chrome.app/Contents/MacOS:$PATH"
#BROWSER="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" # additional escape characters apparently still needed because of later evaluation
# add yabai (wm) scripts
export PATH="${XDG_CONFIG_HOME:-$HOME/.config}/yabai/scripts:$PATH"
# java kek
export PATH="/usr/local/opt/openjdk/bin:$PATH"
# android studio
export ANDROID_HOME="$HOMEBREW_PREFIX/share/android-commandlinetools"
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
# riscv-toolchain
# https://github.com/riscv-software-src/homebrew-riscv/issues/111#issuecomment-1803490459
export PATH="$(brew --prefix bison)/bin:$PATH"
# git core make doc
export PATH="$(brew --prefix libxslt)/bin:$PATH"
# local docker
export PATH="$HOME/.docker/bin:$PATH"
;;
linux*)
#echo "LINUX" ;;
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
export N_PREFIX="$HOME/.local"
;;
bsd*) #echo "BSD" ;;
;;
msys*) #echo "WINDOWS" ;;
;;
*) #echo "unknown: $OSTYPE" ;;
;;
esac
# gpg stuff
# https://bbs.archlinux.org/viewtopic.php?pid=1490821#p1490821
###export GPG="gpg2" # NO NEED, KEEP DISABLED UNLES U KNOW WHAT UR DOING
export GPG_TTY=$(tty)
export GPG_AGENT_INFO="_" # set to non-empty to avoid the check in /usr/bin/pass
#eval $(keychain --eval -Q --quiet id_rsa)
# see https://wiki.archlinux.org/index.php/GnuPG#Configure_pinentry_to_use_the_correct_TTY
# questionable if I need this
gpg-connect-agent updatestartuptty /bye >/dev/null
command -v yarn &>/dev/null && {
# needs to be below because nvm
# see https://stackoverflow.com/a/15646750/9285308
# and https://github.com/yarnpkg/yarn/issues/2049#issuecomment-397629921
export NODE_PATH="$(yarn global dir)"
export PATH="$NODE_PATH/node_modules/.bin:$PATH"
export PATH="$(yarn global bin):$PATH"
}
# pnpm
export PNPM_HOME="$HOME/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
# pnpm end
[ -f ~/yarn-completion.bash ] && . ~/yarn-completion.bash
[ -f "$CARGO_HOME/env" ] && . "$CARGO_HOME/env"
case "$OSTYPE" in
solaris*) ;;
darwin*) ;;
linux*)
# Switch escape and caps if tty and no passwd required:
sudo -n loadkeys ~/.local/share/larbs/ttymaps.kmap 2>/dev/null
# MUST BE LAST:
# Start graphical server on tty1 if not already running.
[ "$(tty)" = "/dev/tty1" ] && ! ps -e | grep -qw Xorg && exec startx
# [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC" # TODO merge investigate
;;
bsd*) ;;
msys*) ;;
*) ;;
esac
## ##
## DO NOT ADD STUFF BELOW THIS ##
## ##