-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc_local
151 lines (121 loc) · 3.7 KB
/
zshrc_local
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
# Custom zsh config
#-------------------------------
#
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
plugins=(
git
pdm
archlinux
vscode
zsh-autosuggestions
zsh-syntax-highlighting
)
source $ZSH/oh-my-zsh.sh
# Envs
#-------------------------------
#
export TERM=xterm-256color
export EDITOR=nvim
export TERMINAL=alacritty
export KERL_BUILD_DOCS="yes"
export KDEWM="$HOME/.cabal/bin/xmonad"
### nvm
export NVM_DIR="$HOME/.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
# Variables/PATH
#-------------------------------
#
export GOPROXY=https://goproxy.cn
export GOPATH="$HOME/workspace/go/package"
export PATH="$PATH:/usr/local/go/bin"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:$HOME/bin"
export PATH="$PATH:$HOME/.cargo/bin"
export PATH="$PATH:$HOME/.cabal/bin"
export PATH="$PATH:$HOME/.ghcup/bin"
export PATH="$PATH:$HOME/.wfuzz/bin"
export PATH="$PATH:$HOME/.local/bin"
export PATH="$PATH:$HOME/.local/share/JetBrains/Toolbox/scripts"
export PATH="$PATH:$HOME/Applications/AFL/bin"
export PATH="$PATH:$HOME/Applications/qemu-7.1.0/build"
# Alias
#-------------------------------
#
alias wl='~/workspace'
alias j='ranger'
alias vi='nvim'
alias hx='helix'
alias zj='zellij'
alias sl="subl"
alias sm="smerge"
# alias emacs="emacsclient -c -a emacs"
# alias grep='rg'
# alias tmux="TERM=screen-256color-bce tmux"
alias cl='clear'
alias gl="git clone"
alias ls="exa --icons --group-directories-first"
alias ll="exa --long --icons --group-directories-first"
alias la="exa --all --long --icons --group-directories-first"
alias bat="bat --style=full --theme=OneHalfDark"
alias cp='cp -i'
alias mv='mv -i'
# where my personal proxy
my_proxy () {
noproxy
export http_proxy="http://127.0.0.1:15777"
export https_proxy="http://127.0.0.1:15777"
git config --global http.proxy http://127.0.0.1:15777
git config --global https.proxy http://127.0.0.1:15777
echo "My HTTP Proxy on"
}
# where work proxy
wk_proxy () {
noproxy
export http_proxy="socks5://127.0.0.1:1089"
export https_proxy="socks5://127.0.0.1:1089"
git config --global http.proxy socks5://127.0.0.1:1089
git config --global https.proxy socks5://127.0.0.1:1089
echo "Work HTTP Proxy on"
}
# where noproxy
noproxy () {
unset http_proxy
unset https_proxy
git config --global --unset http.proxy
git config --global --unset https.proxy
echo "HTTP Proxy off"
}
# Bootstrap
#-------------------------------
#
### conda initialize
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/changfeng/Applications/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/changfeng/Applications/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/changfeng/Applications/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/changfeng/Applications/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
### fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
### ghcup Haskell
[ -f "/home/changfeng/.ghcup/env" ] && source "/home/changfeng/.ghcup/env" # ghcup-env
### xmake
[[ -s "$HOME/.xmake/profile" ]] && source "$HOME/.xmake/profile" # load xmake profile
### opam OCaml
[[ ! -r /home/changfeng/.opam/opam-init/init.zsh ]] || source /home/changfeng/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
### powerlevel10k (to customize prompt, run `p10k configure` or edit ~/.p10k.zsh)
# [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
### zoxide that is cd in rust
eval "$(zoxide init zsh)"
### zellij autostart when shell launched
# eval "$(zellij setup --generate-auto-start zsh)"
### starship
# eval "$(starship init zsh)"