-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
253 lines (194 loc) · 6.29 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="${HOME}/.oh-my-zsh"
source $ZSH/oh-my-zsh.sh
if [[ $(uname) == "Linux" ]]; then
source ~/.config/linux/linuxbrew.zsh
else
source ~/.config/osx/homebrew.zsh
fi
# FZF setup
source ~/.fzf.zsh
# asdf setup
source ~/.config/asdf/asdf_setup.zsh
# obsidianmd-cli completions
source ~/.config/completions/obsidianmd.zsh
# Custom syntax highlighting must come before activating zsh-syntax-highlighting
# source ~/.config/tokyonight/zsh-syntax-highlighting.zsh
source ~/.config/catppuccin/zsh-syntax-highlighting/themes/catppuccin_macchiato-zsh-syntax-highlighting.zsh
# Antigen plugins
source $(brew --prefix)/share/antigen/antigen.zsh
antigen use oh-my-zsh
antigen bundle alias-finder
antigen bundle aliases
antigen bundle atuinsh/atuin@main
antigen bundle autoenv
antigen bundle bundler
antigen bundle command-not-found
antigen bundle compleat
antigen bundle containers
antigen bundle copybuffer
antigen bundle copyfile
antigen bundle copypath
antigen bundle cp
antigen bundle kazhala/dotbare
antigen bundle fzf
antigen bundle gh
antigen bundle git
antigen bundle gpg-agent
antigen bundle pip
antigen bundle podman
antigen bundle rails
antigen bundle rsync
antigen bundle ruby
antigen bundle ssh-agent
antigen bundle redxtech/zsh-kitty
antigen bundle yarn
# Load order matters; must be last
antigen bundle zdharma-continuum/fast-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle marlonrichert/zsh-autocomplete@main
if [[ $(uname) == "Linux" ]]; then
source ~/.config/linux/linux_zsh_plugins.zsh
else
source ~/.config/osx/osx_zsh_plugins.zsh
fi
antigen apply
# oh-my-posh theme
# tokyonight_moon
# eval "$(oh-my-posh init zsh --config ~/.config/tokyonight/oh-my-posh/tokyonight_moon.omp.yaml)"
# Catppuccin Macchiato
eval "$(oh-my-posh init zsh --config ~/.config/catppuccin/oh-my-posh/catppuccin_macchiato.omp.yaml)"
eval $(thefuck --alias)
# Source zsh config based on operating system used.
if [[ $(uname) == "Linux" ]]; then
source ~/.config/linux/linux.zsh
else
source ~/.config/osx/osx.zsh
fi
# enable autocomplete function
source $(brew --prefix zsh-autocomplete)/share/zsh-autocomplete/zsh-autocomplete.plugin.zsh
# zsh-autocomplete config, Leave out _expand
zstyle ':completion:*' completer _complete _complete:-fuzzy _correct _approximate _ignored
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
HYPHEN_INSENSITIVE="true"
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='nvim'
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# 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`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
export PATH="$(brew --prefix imagemagick@6)/bin:$PATH"
export PATH="$(brew --prefix openssl@3)/bin:$PATH"
export PATH="$(brew --prefix make)/libexec/gnubin:$PATH"
export PATH="${HOME}/.local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
export XDG_CONFIG_HOME="${HOME}/.config"
export YAMLLINT_CONFIG_FILE="${XDG_CONFIG_HOME}/yamllint/config.yml"
export PRETTIERD_DEFAULT_CONFIG="~/.config/prettier/prettier.config.js"
# Homebrew aliases
alias bsc="brew services cleanup"
alias bsl="brew services list"
alias bsp="brew services stop"
alias bsr="brew services restart"
alias bss="brew services start"
# Colorls setup
source $(dirname $(gem which colorls))/tab_complete.sh
alias lc="colorls --dark"
alias l="colorls -l --dark"
alias ll="colorls -lA --dark"
alias la="colorls -la --dark"
alias lt="colorls -lt --dark"
alias lS="colorls -lS --dark"
alias lr="colorls --tree=5 --dark"
alias lx="colorls -lAX --dark"
# Tre setup
tre() { command tre "$@" -e && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
alias zshrc='${=EDITOR} ${ZDOTDIR:-$HOME}/.zshrc' # Quick access to the .zshrc file
alias grep='grep --color'
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
alias t='tail -f'
# Command line head / tail shortcuts
alias -g H='| head'
alias -g T='| tail'
alias -g G='| grep'
alias -g L="| less"
alias -g M="| most"
alias -g LL="2>&1 | less"
alias -g CA="2>&1 | cat -A"
alias -g NE="2> /dev/null"
alias -g NUL="> /dev/null 2>&1"
alias -g P="2>&1| pygmentize -l pytb"
alias dud='du -d 1 -h'
alias duf='du -sh *'
alias fdir='find -L . -type d | fzf > selected --height=100%'
alias ffile='find -L . -type f | fzf > selected --height=100%'
alias h='history'
alias hgrep="fc -El 0 | grep"
alias help='man'
alias p='ps -f'
alias sortnr='sort -n -r'
alias unexport='unset'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
#read documents
alias -s ps=gv
alias -s dvi=xdvi
alias -s chm=xchm
alias -s djvu=djview
#list whats inside packed file
alias -s zip="unzip -l"
alias -s rar="unrar l"
alias -s tar="tar tf"
alias -s tar.gz="echo "
alias -s ace="unace l"
alias cc='gcc'
alias CC='gcc'
# Lazygit setup
# Lazydocker setup
export DOCKER_HOST=unix:///run/user/1000/podman/podman.sock
alias docker='podman'
# Podman Compose aliases
alias pc='podman compose'
# dotbare/dot files config
export DOTBARE_DIR="$HOME/.cfg"
export DOTBARE_TREE="$HOME"
# Set alias for dotfiles config
alias config=dotbare
# enable alias-finder
zstyle ':omz:plugins:alias-finder' autoload yes # disabled by default
alias spectral='spectral-language-server'
# enable autoenv
source $(brew --prefix autoenv)/activate.sh
# kitty completeions
__kitty_complete
# use bat(cat) as a colorizing pager for man
export MANPAGER="sh -c 'col -bx | cat -1 man -p'"
# Uncomment below if you experience formatting problems
# export MANROFFOPT="-c"
# Ripgrep config
export RIPGREP_CONFIG_PATH="${XDG_CONFIG_HOME}/ripgrep/.ripgreprc"
# Zoxide setup
eval "$(zoxide init zsh)"
# Enable vi mode
bindkey -v