-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
163 lines (140 loc) · 4.3 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
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.zig/bin:$HOME/.config/emacs/bin:$HOME/go/bin:/usr/local/bin:$PATH
# default browser
export BROWSER=/usr/bin/firefox
export EDITOR='nvim'
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
export GPG_TTY=$(tty)
export PINENTRY_USER_DATA="USE_TTY=1"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# zstyle ':omz:update' frequency 7
DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
plugins=(
ansible
aws
brew
# bun
colorize
common-aliases
# composer
cp
docker
docker-compose
# dnf
conda
extract
fzf
gem
git
# git-flow
gitignore
golang
kubectl
# laravel
minikube
mvn
node
npm
nvm
opentofu
# perl
# podman
pre-commit
python
rust
spring
ssh
starship
sudo
systemd
tmux
uv
zoxide
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
export EDITOR='nvim'
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Standard aliases
alias zshconfig="nvim ~/.zshrc"
alias ls="lsd"
alias rm="rip"
alias makessh="ssh-keygen -t ed25519 -C \"[email protected]\""
alias lofi="mpv \"https://www.youtube.com/watch?v=jfKfPfyJRdk\" --no-video"
alias cargup="rustup update; cargo install-update -a"
alias clr="clear"
alias upp="rustup update; cargo install-update -a; brew up; brew upgrade;"
alias lofi="mpv \"https://www.youtube.com/watch?v=jfKfPfyJRdk\" --no-video"
alias vibe="mpv \"https://music.youtube.com/playlist?list=PLIwxj45VjSXUJr34vOVE2q0EUFqO7OO-3\" --no-video --loop-playlist"
alias zzz="exit"
alias gcn="git commit --no-verify"
alias ms="minikube start"
alias md="minikube delete"
alias av="aws-vault exec octi -- "
alias dsh="docker run -it --entrypoint /bin/sh"
# Conditional aliases
type nala >/dev/null 2>&1 && alias se="nala search"
type nala >/dev/null 2>&1 && alias in="sudo nala install"
type nala >/dev/null 2>&1 && alias up="flatpak update -y; \
sudo nala upgrade --assume-yes;"
type pacman >/dev/null 2>&1 && alias se="pacman -Ss"
type pacman >/dev/null 2>&1 && alias in="sudo pacman -S"
type pacman >/dev/null 2>&1 && alias up="flatpak update -y; \
sudo pacman -Syyu;"
type tree >/dev/null 2>&1 && alias treee="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
type wl-paste >/dev/null 2>&1 && alias ggit="git clone \"$(wl-paste)\""
type wl-copy >/dev/null 2>&1 && alias clipkey="wl-copy < ~/.ssh/id_ed25519.pub"
type wl-paste >/dev/null 2>&1 && alias vid="mpv $(wl-paste)"
type wl-paste >/dev/null 2>&1 && alias novid="mpv $(wl-paste) --no-video"
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
function gitfind() {
find . -type d -name ".git" -print0 | while IFS= read -r -d $'\0' dir; do
(echo "$dir" && cd "$dir/.." && git pull)
done
}
function gitfd() {
fd -t d -H .git | while read -r repo; do
(echo "$repo" && cd "$repo/.." && git pull)
done
}
if [[ -f ~/.cht ]]; then
alias cht="cat ~/.cht"
fi
bindkey '^ ' autosuggest-accept
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/omary/.anaconda/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/omary/.anaconda/etc/profile.d/conda.sh" ]; then
. "/home/omary/.anaconda/etc/profile.d/conda.sh"
else
export PATH="/home/omary/.anaconda/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
. "$HOME/.cargo/env"
eval "$(mcfly init zsh)"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
export PATH="$PATH:$HOME/.rvm/bin"
export AWS_VAULT_BACKEND=pass
# opam configuration
# [[ ! -r /home/omary/.opam/opam-init/init.zsh ]] || source /home/omary/.opam/opam-init/init.zsh > /dev/null 2> /dev/null