-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshenv.tmpl
190 lines (158 loc) · 7.16 KB
/
dot_zshenv.tmpl
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
# .zshenv is always sourced. It often contains exported variables that should be available to other programs. For example, $PATH, $EDITOR, and $PAGER are often set in .zshenv. Also, you can set $ZDOTDIR in .zshenv to specify an alternative location for the rest of your zsh configuration.
# .zprofile is for login shells. It is basically the same as .zlogin except that it's sourced before .zshrc whereas .zlogin is sourced after .zshrc. According to the zsh documentation, ".zprofile is meant as an alternative to .zlogin for ksh fans; the two are not intended to be used together, although this could certainly be done if desired."
# .zshrc is for interactive shells. You set options for the interactive shell there with the setopt and unsetopt commands. You can also load shell modules, set your history options, change your prompt, set up zle and completion, et cetera. You also set any variables that are only used in the interactive shell (e.g. $LS_COLORS).
# .zlogin is for login shells. It is sourced on the start of a login shell but after .zshrc, if the shell is also interactive. This file is often used to start X using startx. Some systems start X on boot, so this file is not always very useful.
# .zlogout is sometimes used to clear and reset the terminal. It is called when exiting, not when opening.
# Locale.
export LANG="en_US.UTF-8"
export LANGUAGE="en_US.UTF-8"
# Term.
export TERM="xterm-256color"
# Added by Toolbox App
export PATH="$PATH:$HOME/Library/Application Support/JetBrains/Toolbox/scripts"
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR="$(command -v nvim)"
export VISUAL="$(command -v nvim)"
export GIT_EDITOR="$(command -v nvim)"
else
export EDITOR="$(command -v nvim)"
export VISUAL="$(command -v nvim)"
export GIT_EDITOR="$(command -v nvim)"
fi
export GPG_TTY=$(tty)
# Default Pager.
export PAGER="less"
# Zsh.
if [ "$(ps -p $$ -ocomm=)" = "zsh" ]; then
# Oh My Zsh.
export ZSH="$HOME/.oh-my-zsh"
# Set a character at the end of partial lines to none.
export PROMPT_EOL_MARK=""
# History settings.
export HISTORY_IGNORE="([bf]g|c|clear|cls|e|exit|h|history|incognito|l|l[adfls]|pwd|z)"
fi
# Bash.
if [ "$(ps -p $$ -ocomm=)" = "bash" ]; then
# History settings.
export HISTTIMEFORMAT="%F %T "
export HISTCONTROL=ignoredups
export HISTIGNORE="[bf]g:c:clear:cls:e:exit:h:history:incognito:l:l[adfls]:pwd"
export HISTSIZE=10000
# Save and reload the history after each command finishes in another bash session.
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
fi
# bat.
export BAT_THEME="Material-Theme-Darker"
# fzf.
export FZF_DEFAULT_OPTS=" \
--color=fg:#c0c5ce,bg:#212121,hl:#808080,fg+:#e6e6e6,bg+:#3b3b3b,hl+:#f7c662 \
--color=info:#f7c662,prompt:#6699cc,pointer:#a6bc69,marker:#a6bc69,spinner:#f7c662,header:#6699cc"
# nnn.
export NNN_OPTS="deo" # Default command-line options
export NNN_BMS="d:~/Downloads;D:~/Documents;t:~/Temporary" # Bookmarks
export NNN_FCOLORS="03040601000205f7d204d9f7" # File colors
export NNN_PLUG="D:-!mediainfo \$nnn" # Plugins
export NNN_TRASH=1 # Trash instead of delete the files
# ripgrep.
export RIPGREP_CONFIG_PATH="$HOME/.ripgreprc"
# Less.
export LESS="--RAW-CONTROL-CHARS"
export LESS_TERMCAP_mb=$'\e[1;31m' # Start blinking
export LESS_TERMCAP_md=$'\e[1;34m' # Start bold mode
export LESS_TERMCAP_me=$'\e[0m' # End all mode
export LESS_TERMCAP_so=$'\e[38;5;215m' # Start standout mode
export LESS_TERMCAP_se=$'\e[0m' # End standout mode
export LESS_TERMCAP_us=$'\e[4;35m' # Start underline
export LESS_TERMCAP_ue=$'\e[0m' # End underline
# me.
export MEPATH="$HOME/.me"
export PATH="$PATH:$MEPATH"
source $HOME/.env
export XDG_CONFIG_HOME="$HOME/.config"
# proxy
# export HTTP_PROXY="http://username:[email protected]:9099"
# export HTTPS_PROXY="https://username:[email protected]:9099"
# ProxyMan.
export PATH="$PATH:/Applications/Proxyman.app/Contents/MacOS/proxyman-cli"
# export REQUESTS_CA_BUNDLE="$MEPATH/combined.pem"
# GO.
export GOROOT="/usr/local/opt/go/libexec"
export GOPATH="$HOME/.go"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:$GOROOT/bin"
export PATH="$PATH:/usr/local/go/bin:$GOPATH/bin"
# Rust.
export RUSTUPPATH="/opt/homebrew/opt/rustup"
export PATH="$PATH:$RUSTUPPATH/bin"
source "$HOME/.cargo/env"
# NodeJs.
# export NODE_OPTIONS="--no-deprecation"
# export NODE_OPTIONS="--openssl-legacy-provider"
# Python
export PYENV_HOME="$HOME/.pyenv"
export PYENV_ROOT="$PYENV_HOME"
export PATH="$PYENV_HOME/bin:$PATH"
export npm_config_python="$PYENV_HOME/bin"
# Xcode.
export XCENV_DO_NOT_SHIM_LIST="git"
export XCENV_HOME="$HOME/.xcenv"
export PATH="$XCENV_HOME/bin:$PATH"
# Java.
export JAVA_HOME="$HOME/.jenv"
export PATH="$JAVA_HOME/bin:$PATH"
# DotNet.
# https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#net-sdk-and-cli-environment-variables
# default install
export DOTNET_ROOT="/usr/local/share/dotnet"
export DOTNET_ROOT_X64="/usr/local/share/dotnet/x64/dotnet/"
# brew install: https://github.com/isen-ng/homebrew-dotnet-sdk-versions
# brew tap isen-ng/dotnet-sdk-versions
# brew install --cask dotnet-sdk8-0-400
# brew uninstall --zap --cask dotnet-sdk8-0-400
# export DOTNET_ROOT="/opt/homebrew/opt/dotnet/libexec"
# export DOTNET_ROOT_X64="/opt/homebrew/opt/dotnet/libexec"
export PATH="$DOTNET_ROOT:$PATH"
export COREHOST_TRACE_VERBOSITY=4
export COREHOST_TRACE=0
export COREHOST_TRACEFILE="$DOTNET_HOME/traces/corehost/host_trace.txt"
export DOTNET_ADD_GLOBAL_TOOLS_TO_PATH=true
export DOTNET_CLI_CONTEXT_ANSI_PASS_THRU=1
export DOTNET_CLI_CONTEXT_VERBOSE=1
export DOTNET_CLI_FORCE_UTF8_ENCODING=1
export DOTNET_CLI_PERF_LOG=0
export DOTNET_CLI_TELEMETRY_OPTOUT=true
export DOTNET_CLI_UI_LANGUAGE="en-us"
export DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE=0
export DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_INTERVAL_HOURS=24
export DOTNET_DISABLE_GUI_ERRORS=1
export DOTNET_EnableDiagnostics_Debugger=1
export DOTNET_EnableDiagnostics_IPC=1
export DOTNET_EnableDiagnostics_Profiler=1
export DOTNET_EnableDiagnostics=1
export DOTNET_EnableEventPipe=1
export DOTNET_EventPipeOutputPath="$DOTNET_HOME/traces/event_pipe/event_pipe.txt"
export DOTNET_GENERATE_ASPNET_CERTIFICATE=0
export DOTNET_HOME="$HOME/.dotnet"
export DOTNET_LAUNCH_PROFILE="$DOTNET_HOME/profiles/launchSettings-Global.json"
export DOTNET_MULTILEVEL_LOOKUP=1
# DOTNET_NEW_PREFERRED_LANG Options: C#, F#, or VB
export DOTNET_NEW_PREFERRED_LANG=C#
export DOTNET_NOLOGO=1
export DOTNET_ROLL_FORWARD_TO_PRERELEASE=0
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=0
export DOTNET_TOOLS_ALLOW_MANIFEST_IN_ROOT=0
export PATH="$DOTNET_HOME/tools:$PATH"
# export DOTNET_SYSTEM_DIAGNOSTICS_DEFAULTACTIVITYIDFORMATISHIERARCHIAL=true
# export DOTNET_SYSTEM_RUNTIME_CACHING_TRACING=true
# NuGet
export NUGET_PACKAGES="$HOME/.nuget/packages"
# Volta
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"
# NVM.
export NVM_HOME="$HOME/.nvm"
export NVM_DIR="$NVM_HOME"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
export PATH="$NVM_HOME/bin:$PATH"