-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc
135 lines (105 loc) · 3.52 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
# POWERLEVEL9K_DIR_FOREGROUND=0
# POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=0
# POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=0
# POWERLEVEL9K_DIR_ANCHOR_BOLD=false
# POWERLEVEL9K_DISABLE_RPROMPT=true
if [[ ! -f ~/.antigen/antigen.zsh ]]; then
mkdir ~/.antigen
curl -L git.io/antigen > ~/.antigen/antigen.zsh
fi
source ~/.antigen/antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
antigen bundle heroku
antigen bundle pip
antigen bundle lein
antigen bundle command-not-found
# Syntax highlighting, colors & autosuggestion bundles.
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-history-substring-search
antigen bundle b4b4r07/emoji-cli
antigen bundle joel-porquet/zsh-dircolors-solarized.git
# Load the theme.
# antigen theme romkatv/powerlevel10k
# Tell Antigen that you're done.
antigen apply
# Uncomment the following line to display red dots whilst waiting for completion.
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765
COMPLETION_WAITING_DOTS="true"
# User configuration
# You may need to manually set your language environment
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export EDITOR='nvim'
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# inspired by https://gist.github.com/siriusjack/2722570eb5de7fee2f7a7d6f5f6c9f7b
function sshf () {
ssh $(grep "Host " ~/.ssh/config | cut -b 6- | fzf --query "$LBUFFER")
}
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
setupsolarized
eval "$(dircolors)"
# Aliases
alias ls='exa --icons'
alias curl='curlie'
alias docker='podman'
alias docker-compose='podman-compose'
alias vim='nvim'
# Kubernetes
alias k=kubecolor
complete -F __start_kubectl k
# Golang
export PATH="$PATH:$HOME/go/bin"
# Python
export PATH="$PATH:$HOME/.poetry/bin"
export PATH="$PATH:$HOME/.pyenv/bin"
export PATH="$PATH:$HOME/.local/bin"
# https://stackoverflow.com/a/68228627/13242975
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
# Node.js
source /usr/share/nvm/init-nvm.sh
# fzf
source /usr/share/fzf/key-bindings.zsh
source /usr/share/fzf/completion.zsh
# Vector
export PATH="$PATH:$HOME/.cargo/bin"
# ssh-agent
export SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket
# Buildx for podman
export DOCKER_HOST=unix:///run/user/1000/podman/podman.sock
podman() {
if [[ $@ == "buildx"* ]]; then
command /usr/lib/docker/cli-plugins/docker-buildx "${@:2}"
else
command podman "$@"
fi
}
# yazi
function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
fi
rm -f -- "$tmp"
}
# Other
export PATH="$PATH:$HOME/.local/bin"
export PATH="$HOME/.vector/bin:$PATH"
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
# The next line updates PATH for Yandex Cloud CLI.
if [ -f '/home/n0nvme/yandex-cloud/path.bash.inc' ]; then source '/home/n0nvme/yandex-cloud/path.bash.inc'; fi
# The next line enables shell command completion for yc.
if [ -f '/home/n0nvme/yandex-cloud/completion.zsh.inc' ]; then source '/home/n0nvme/yandex-cloud/completion.zsh.inc'; fi
eval "$(starship init zsh)"
eval "$(zoxide init zsh)"
eval "$(navi widget zsh)"