-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshenv
127 lines (117 loc) · 4.05 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
#!/bin/zsh
typeset -U path
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export XDG_CACHE_HOME="$HOME/.cache"
# export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
export XMODIFIERS=@im=fcitx5
ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export ANTIDOTE_HOME="$ZDOTDIR/antidote"
export CARGO_HOME="$XDG_DATA_HOME"/cargo
export BUN_INSTALL="$XDG_DATA_HOME"/bun
export DENO_INSTALL="$XDG_DATA_HOME"/deno
export WINEPREFIX="$XDG_DATA_HOME"/wine
export WGETRC="$XDG_CONFIG_HOME/wgetrc"
export W3M_DIR="$XDG_DATA_HOME"/w3m
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle
export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
export IPYTHONDIR="$XDG_CONFIG_HOME/ipython"
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
export ANSIBLE_HOME="$XDG_DATA_HOME"/ansible
# export CLICOLOR_FORCE=1
if [[ "$(uname -a)" == *WSL* ]]; then
machine="wsl"
elif [[ -f /etc/fedora-release ]]; then
machine="fedora"
else
machine="unknown"
fi
export HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew
export HOMEBREW_NO_ANALYTICS=1
case $machine in
"wsl")
export UNISON="$XDG_CONFIG_HOME/unison"
skip_global_compinit=1
export PATH=:$PATH
export HISTFILE="$ZDOTDIR/.zhistory"
export EDITOR="$HOMEBREW_PREFIX/bin/nvim"
export VISUAL="$HOMEBREW_PREFIX/bin/nvim"
export DISPLAY=localhost:0
export WAYLAND_DISPLAY=$DISPLAY
export LIBGL_ALWAYS_INDIRECT=1
export XDG_SESSION_TYPE=x11
if [[ -n $SSH_TTY ]]; then
export HTTP_PROXY="http://127.0.0.0:7897"
export HTTPS_PROXY="http://127.0.0.1:7897"
fi
;;
"fedora")
export HTTPS_PROXY=http://127.0.0.1:7897
export HTTP_PROXY=http://127.0.0.1:7897
export ALL_PROXY=socks5://127.0.0.1:7897
export NO_PROXY="127.0.0.1,::1,localhost"
export HISTFILE="$ZDOTDIR/.zsh_history"
export EDITOR="nvim"
export VISUAL="nvim"
# export OPENAI_API_KEY=$(gopass show api/gpt)
# export ANTHROPIC_API_KEY=$(gopass show api/claude)
# export PGPASSWORD=$(gopass show postgre)
;;
esac
export MANROFFOPT="-c"
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANPATH="${MANPATH-$(manpath)}:/home/theo/.local/share/npm/share/man:/home/theo/programs/texlive/2024/texmf-dist/doc/man"
export HISTORY_IGNORE="ls *:ll *:cd *:pwd:exit:history"
export HISTSIZE=50000
export SAVEHIST=10000
export HISTTIMEFORMAT="%Y/%m/%d %H:%M:%S "
export HISTCONTROL=ignoreboth
export HISTDUP=erase
export SBCL_HOME="/home/theo/programs/sbcl/lib/sbcl"
export GOBIN="/home/theo/.local/share/go/bin"
export GOPATH="/home/theo/.local/share/go"
# fzf stuff
export FZF_CTRL_T_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git --exclude .github"
export FZF_ALT_C_COMMAND="fd --type d --hidden --strip-cwd-prefix --exclude .git --exclude .github"
export FZF_CTRL_T_OPTS="--select-1 --exit-0"
export FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden:wrap --bind '?:toggle-preview'"
export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200' --select-1 --exit-0"
export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --ansi"
paths=(
"$XDG_DATA_HOME/bin"
"$XDG_DATA_HOME"/go/bin
"$XDG_CONFIG_HOME"/emacs/bin
"$XDG_CONFIG_HOME"/miktex/bin
"$XDG_DATA_HOME"/npm/bin
"$XDG_DATA_HOME"/JetBrains/Toolbox/scripts
"$XDG_DATA_HOME"/bun/bin
"$XDG_DATA_HOME"/deno/bin
"$XDG_DATA_HOME"/juliaup/bin
"$XDG_DATA_HOME"/flutter/bin
"$XDG_DATA_HOME"/jdk-19.0.1/bin
"$XDG_DATA_HOME"/flutter/bin
"$HOMEBREW_PREFIX"/bin
"$HOMEBREW_PREFIX"/sbin
"/usr/local/cuda-12.4/bin"
"/usr/local/cuda/bin"
"/home/theo/.pub-cache/bin"
)
for entry in "${paths[@]}"; do
path=($entry $path)
done
envs=(
"$XDG_DATA_HOME/cargo/env"
)
for env in "${envs[@]}"; do
[ -f "$env" ] && . "$env"
done
unset env