-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc
168 lines (162 loc) · 4.59 KB
/
dot_zshrc
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
########################################
# Theme {{
########################################
ZSH_THEME="spaceship"
########################################
# }}
# Plugins {{
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
########################################
plugins=(
brew
docker-compose
extract
fzf
git
kubectl
kubectx
pip
ruby
virtualenv
z
zsh-autosuggestions
zsh-completions
zsh-history-substring-search
zsh-syntax-highlighting
)
########################################
# }}
# Aliases {{
########################################
alias zshrc="vim ~/.zshrc"
alias vimrc="vim ~/.config/nvim/init.vim"
alias kclip="xclip -sel cli <"
alias gdestroy="gsta -u && gstd"
alias vim=nvim
alias cljfmt-fix='cljfmt fix'
alias cljfmt-check='cljfmt check'
alias clj-antq='clojure -Tantq outdated'
alias insecure-brave='open -n -a /Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security'
alias ktx="kubectx"
alias kns="kubens"
alias src="omz reload"
alias clj-repl='clojure -M:dev:local/devtools:repl/conjure'
# Pipo
psv() {
pipo secrets view "$1" "$2" | bat -l json
}
pse() {
pipo secrets edit "$1" "$2"
}
pfcv() {
pipo features-config view "$1" | bat -l edn
}
pfce() {
pipo features-config edit "$1"
}
gri () {
git rebase -i $(git rev-parse origin/master)
}
kdeps () {
clj-kondo --copy-configs --dependencies --lint '$(clojure -Spath -A:dev)' --parallel
}
nrepl() {
clj -A:dev -J-Dedge.dev.nrepl=true -Sdeps '{:deps {nrepl {:mvn/version "0.7.0"} cider/cider-nrepl {:mvn/version "0.25.2"}}}' \
-m nrepl.cmdline \
--middleware '["cider.nrepl/cider-middleware"]' \
--interactive
}
########################################
# }}
# General configs {{
########################################
export LANG=en_US.UTF-8
# 10ms for key sequences
KEYTIMEOUT=1
bindkey "^P" history-substring-search-up
bindkey "^N" history-substring-search-down
export NVIM=$(which nvim)
export EDITOR=$NVIM
export PATH="$HOME/.local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
export TERM=alacritty
#if command -v pyenv 1>/dev/null 2>&1; then
#eval "$(pyenv init -)"
#eval "$(pyenv virtualenv-init -)"
#fi
export PIPO_CLI="$HOME/pipo/pipo-cli"
export PATH="$PIPO_CLI/bin:$PATH"
RPS1='$(kubectx_prompt_info)'
########################################
# }}
# Program specifics {{
########################################
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
ZSH_DISABLE_COMPFIX=true
# oh-my-zsh {{
export ZSH=~/.oh-my-zsh
source $ZSH/oh-my-zsh.sh
# ssh {{
export SSH_KEY_PATH="~/.ssh/keygo"
# }}
# FZF {{
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# }}
# Android {{
if [ -d $HOME/Library/Android/sdk ]
then
export ANDROID_HOME=$HOME/Library/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/emulator
alias rshake='adb shell input keyevent 82'
fi
# }}
# Node version manager (NVM) {{
if [ -d $HOME/.nvm ]
then
export NVIM="/usr/local/bin/nvim"
export NVM_DIR="$HOME/.nvm"
#[ -s "/usr/local/opt/nvm/nvm.sh"] && \. "/usr/local/opt/nvm/nvm.sh"
[ -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
fi
# }}
# Terraform {{
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /usr/local/bin/terraform terraform
# }}
# Desk {{
# Hook for desk activation
[ -n "$DESK_ENV" ] && source "$DESK_ENV" || true
# }}
# GLABELS {{
export GTAGSLABEL=ctags
# }}
# SDKMAN {{
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
# }}
# UUID generator for Unix {{
function getuuid {
uuid=$(uuidgen | tr 'A-Z' 'a-z' | tr -d '\n')
echo "⌘-V to paste $uuid"
echo -n "$uuid" | pbcopy
}
export getuuid
# }}
# Emacs {{
export PATH="$HOME/.config/emacs/bin:$PATH"
alias ec="emacsclient -c -a 'emacs'"
# }}
########################################
# }}
########################################
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
# Generated for envman. Do not edit.
[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="/Applications/IntelliJ IDEA CE.app/Contents/MacOS:$PATH"