-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
167 lines (132 loc) · 4.67 KB
/
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
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# pyenv
eval "$(pyenv init -)"
# eval "$(pyenv virtualenv-init -)"
# User configuration
export PATH=$PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
# Add paths
if [[ -d "$HOME/bin" ]]; then
export PATH=$PATH:"$HOME/bin"
fi
if [[ -d "$HOME/.local/bin" ]]; then
export PATH=$PATH:"$HOME/.local/bin"
fi
if [[ -d "$HOME/.dotfiles/bin" ]]; then
export PATH=$PATH:"$HOME/.dotfiles/bin"
fi
if [[ -d "/usr/local/go/bin" ]]; then
export PATH=$PATH:"/usr/local/go/bin"
fi
if [[ -d "$HOME/development/flutter/bin" ]]; then
export PATH=$PATH:"$HOME/development/flutter/bin"
fi
if [[ -d "$HOME/.config/composer/vendor/bin" ]]; then
export PATH=$PATH:"$HOME/.config/composer/vendor/bin"
fi
if [[ -d "$HOME/.composer/vendor/bin" ]]; then
export PATH=$PATH:"$HOME/.composer/vendor/bin"
fi
if [[ -d "$HOME/.cargo/bin" ]]; then
export PATH=$PATH:"$HOME/.cargo/bin"
fi
if [[ -d "$HOME/.yarn/bin" ]]; then
export PATH=$PATH:"$HOME/.yarn/bin"
fi
if [[ -d "$HOME/.gem/ruby/2.3.0/bin" ]]; then
export PATH=$PATH:"$HOME/.gem/ruby/2.3.0/bin"
fi
if [[ -d "$HOME/.anaconda3" ]]; then
export PATH=$PATH:"$HOME/.anaconda3/bin"
fi
if [[ -d "$HOME/.poetry/bin" ]]; then
export PATH=$PATH:"$HOME/.poetry/bin"
fi
if [[ -d "$HOME/.fly" ]]; then
export FLYCTL_INSTALL="$HOME/.fly"
export PATH="$FLYCTL_INSTALL/bin:$PATH"
fi
# Cuda
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/cuda/lib64"
export CUDA_HOME=/opt/cuda/
# You may need to manually set your language environment
export LANG=en_US.UTF-8
export EDITOR='vim'
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# Alias
alias gst="git status"
alias gdi="git diff"
alias gda="git branch -a"
alias gcm="git checkout master"
alias dkc="docker-compose"
# 256 color terminal
export TERM="screen-256color"
# Source shellder theme
# source ~/.dotfiles/zsh/spaceship/spaceship.zsh-theme
# DART OPTIONS
export PATH=$PATH:~/.pub-cache/bin
# GO OPTIONS
export GOPATH=$HOME/local/go
export PATH=$PATH:$GOPATH/bin
# Set ANDROID_HOME
if [[ -d "/opt/android-sdk" ]]; then
export ANDROID_HOME="/opt/android-sdk"
fi
if [ $commands[kubectl] ]; then
source <(kubectl completion zsh)
fi
# Import colorscheme from wal
# ps -o 'command=' -p $(ps -o 'ppid=' -p $$) | grep -v 'idea' &> /dev/null
# if [ $? -eq 0 ]; then
# if [[ -f ~/.cache/wal/sequences ]]; then
# (cat ~/.cache/wal/sequences &)
# fi
# if [[ -f ~/.cache/wal/colors-tty.sh ]]; then
# source ~/.cache/wal/colors-tty.sh
# fi
# fi
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# fzf
[ -f /usr/share/fzf/key-bindings.zsh ] && source /usr/share/fzf/key-bindings.zsh
[ -f /usr/share/fzf/completion.zsh ] && source /usr/share/fzf/completion.zsh
setopt EXTENDED_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_BEEP
export PATH=/Users/kdesrosiers/.local/bin:$PATH
# TEMP I GUESS
export PATH="/usr/local/opt/node@14/bin:$PATH"
export PATH="/usr/local/opt/node@16/bin:$PATH"
# Load Angular CLI autocompletion.
# source <(ng completion script)
# Terraform alias
alias tws='terraform workspace select'
alias tpw='terraform plan -var-file=./$(terraform workspace show).tfvars'
alias taw='terraform apply -var-file=./$(terraform workspace show).tfvars'
alias trw='terraform refresh -var-file=./$(terraform workspace show).tfvars'
alias tdw='terraform destroy -var-file=./$(terraform workspace show).tfvars'
alias tcw='terraform console -var-file=./$(terraform workspace show).tfvars'
#Utils
alias xmonadedit='vim /home/kdesrosiers/.xmonad/xmonad.hs'
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/kdesrosiers/google-cloud-sdk/path.zsh.inc' ]; then . '/home/kdesrosiers/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/kdesrosiers/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/kdesrosiers/google-cloud-sdk/completion.zsh.inc'; fi
eval "$(zoxide init zsh)"