-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc
More file actions
232 lines (190 loc) Β· 6.89 KB
/
Copy path.zshrc
File metadata and controls
232 lines (190 loc) Β· 6.89 KB
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
# Amazon Q pre block. Keep at the top of this file.
[[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.pre.zsh"
# π Powerlevel10k Instant Prompt
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
# Set XDG Config home
export XDG_CONFIG_HOME="$HOME/.config"
# π οΈ Oh My Zsh Configuration
export ZSH="$HOME/.oh-my-zsh"
eval "$(starship init zsh)" # Starship Config
# Miniconda
# export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH" # commented out by conda initialize
# π¨ Syntax Highlighting and Autosuggestions
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
(( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[path]=none
ZSH_HIGHLIGHT_STYLES[path_prefix]=none
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# π Plugins
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
# π οΈ User Configuration
# Preferred editor for local and remote sessions
# export EDITOR='nvim'
# π Aliases
alias cls='clear'
alias c='clear'
alias e=exit
alias n='nvim'
alias nzsh='n ~/.zshrc'
alias t='touch'
alias y='yazi'
# Next level of an ls
# options : --no-filesize --no-time --no-permissions
alias ls="eza --no-filesize --color=always --icons=always --no-user"
# π Directory Navigation Aliases
alias ..='cd ..'
alias ...='cd ../..'
alias cd='z'
# π¦ File Management Aliases
alias rm='rm -i'
alias cp='cp -i'
alias mkdir='mkdir -p'
alias sf='fzf | xargs nvim'
alias pp='echo $PATH | tr ":" "\n" | fzf'
# π¦ Git Aliases
alias g='XDG_CONFIG_HOME="$HOME/.config" lazygit'
alias gl='git log'
alias gs='git status'
alias gi='git init'
alias gaa='git add .'
alias gc='git commit -m'
# alias grc='git repo create'
alias grao='git remote add origin'
alias grc='git rev-list --count HEAD'
alias ghrw='gh repo view --web'
# JavaScript Aliases
alias cap='cat package.json'
alias bd='bun dev'
alias bp='bun run build && bun run preview'
alias bb='bun run build'
alias yd='yarn dev'
alias yb='yarn build'
# π΅ Media Aliases
alias yt-mp3='yt-dlp -x --audio-format mp3 --audio-quality 0'
alias dlbeat='cd ~/Music/yt-dls/instrumentals/ && yt-dlp -x --audio-format mp3 --audio-quality 0'
alias yt-1080p='yt-dlp -f "bestvideo[height=1080]+bestaudio/best"'
# π οΈ Development Aliases
alias create-evm-fish='fish ~/scripts/create-evm-project.fish'
alias create-evm='sh ~/scripts/create-evm-project.sh'
# π§ Configuration File Aliases
alias nrc='vim ~/.config/nvim/lua/'
alias orc='vim $BASE_PATH/.obsidian.vimrc'
alias zrc='vim ~/.zshrc'
alias erc='vim ~/.config/espanso/'
alias sfs='source ~/.zshrc'
alias arc='vim ~/.alacritty.yml'
alias wrc='vim ~/.config/wezterm/wezterm.lua'
alias skrc='vim ~/.skhdrc'
alias trc='vim ~/.tmux.conf'
alias zelrc='vim ~/.config/zellij/config.kdl'
alias yrc='vim ~/.yabairc'
alias krc='vim ~/AquaFiles/gen-karabiner-config/rules.ts'
# π οΈ Utility Aliases
# alias gl=gorilla
# alias btop=bpytop
alias nf='neofetch'
alias ff='fastfetch'
alias cat=bat
alias lg='lazygit'
alias ct=cointop
alias top=htop
alias logk='tail -f ~/.local/share/karabiner/log/console_user_server.log'
# ποΈ Zellij Aliases
alias zel='zellij --layout ~/.config/zellij/layouts/dev.kdl'
alias zls='zellij ls'
alias za='zellij attach'
# π οΈ Homebrew Aliases
export HOMEBREW_CASK_OPTS="--no-quarantine"
HOMEBREW_NO_AUTO_UPDATE=1
HOMEBREW_NO_INSTALL_CLEANUP=1
alias bi='brew install'
alias bs='brew search'
alias binfo='brew info'
# π Python Aliases
alias plf='pip list | fzf'
alias clf='conda list | fzf'
alias pfz='pip freeze > requirements.txt'
alias zelalgo='conda activate algo-trading && zellij --layout ~/Projects/algo-trading/moondev-bootcamp/code/day-2/data-streams/crypto-data-streams.kdl'
# π FZF Setup
eval "$(fzf --zsh)"
export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .git"
export FZF_DEFAULT_OPTS="--height 50% --layout=default --border --color=hl:#2dd4bf"
# Setup fzf previews
export FZF_CTRL_T_OPTS="--preview 'bat --color=always -n --line-range :500 {}'"
export FZF_ALT_C_OPTS="--preview 'eza --icons=always --tree --color=always {} | head -200'"
# fzf preview for tmux
export FZF_TMUX_OPTS=" -p90%,70% "
alias f='fzf'
# fzf scripts
alias nlof="~/.config/scripts/fzf_listoldfiles.sh"
# opens documentation through fzf (eg: git,zsh etc.)
alias fman="compgen -c | fzf | xargs man"
# FZF with Git right in the shell by Junegunn : check out his github below
# Keymaps for this is available at https://github.com/junegunn/fzf-git.sh
source ~/.config/scripts/fzf-git.sh
# π Zoxide
eval "$(zoxide init zsh)"
# zoxide (called from ~/scripts/)
alias nzo="~/.config/scripts/zoxide_openfiles_nvim.sh"
# π οΈ Bun Install Config
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# π¦ pnpm
export PNPM_HOME="/Users/elkenzi/Library/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# π Conda
# π¦ Rust
export PATH="$HOME/.cargo/bin:$PATH"
# π₯ Mamba Initialization
export MAMBA_EXE='/usr/local/bin/micromamba'
export MAMBA_ROOT_PREFIX='/Users/elkenzi/.local/share/mamba'
__mamba_setup="$("$MAMBA_EXE" shell hook --shell zsh --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
alias micromamba="$MAMBA_EXE"
fi
unset __mamba_setup
# π History Setup
HISTFILE=$HOME/.zhistory
SAVEHIST=1000
HISTSIZE=999
setopt share_history
setopt hist_expire_dups_first
setopt hist_ignore_dups
setopt hist_verify
# π Key Bindings for History Search
bindkey '^[0A' history-search-backward
bindkey '^[0B' history-search-forward
# π GPG TTY
export GPG_TTY=/dev/ttys067
# π οΈ Note: FZF Git Integration
# Keymaps for this is available at https://github.com/junegunn/fzf-git.sh
PATH=~/.console-ninja/.bin:$PATH
# Added by Windsurf
export PATH="/Users/elkenzi/.codeium/windsurf/bin:$PATH"
export HOMEBREW_NO_AUTO_UPDATE=1
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/usr/local/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/usr/local/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then
. "/usr/local/Caskroom/miniconda/base/etc/profile.d/conda.sh"
else
export PATH="/usr/local/Caskroom/miniconda/base/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# Amazon Q post block. Keep at the bottom of this file.
[[ -f "${HOME}/Library/Application Support/amazon-q/shell/zshrc.post.zsh" ]] && builtin source "${HOME}/Library/Application Support/amazon-q/shell/zshrc.post.zsh"