-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzshrc
77 lines (63 loc) · 2.2 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
# Use $ZDOTDIR if defined, fallback to $HOME
ZDOTDIR=${ZDOTDIR:-$HOME}
# -----------------------------------------------------------------------------
# 1. Ensure Antidote is installed.
# -----------------------------------------------------------------------------
ANTIDOTE_DIR="$ZDOTDIR/.antidote"
ANTIDOTE_FILE="$ANTIDOTE_DIR/antidote.zsh"
if [ ! -f "$ANTIDOTE_FILE" ]; then
echo "Antidote not found. Installing Antidote..."
# Clone the Antidote repo (you can adjust depth or use the installer script if you like)
git clone --depth=1 https://github.com/mattmc3/antidote.git "$ANTIDOTE_DIR"
fi
# Load Antidote and your plugins list.
source "$ANTIDOTE_FILE"
antidote load "$ZDOTDIR/.zsh/zsh_plugins.txt"
#om-my-posh
if (( $+commands[oh-my-posh] )); then
# eval "$(oh-my-posh init zsh --config /opt/homebrew/opt/oh-my-posh/themes/pure.omp.json)"
# eval "$(oh-my-posh init zsh --config /opt/homebrew/opt/oh-my-posh/themes/tokyonight_storm.omp.json)"
eval "$(oh-my-posh init zsh --config ~/git/dotfiles/jph.omp.yaml)"
# Initialize Starship prompt
elif (( $+commands[starship] )); then
eval "$(starship init zsh)"
fi
# pyenv
# Load pyenv
if (( $+commands[pyenv] )); then
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi
if (( $+commands[pyenv-virtualenv-init] )); then
eval "$(pyenv virtualenv-init -)"
fi
if (( $+commands[direnv] )); then
eval "$(direnv hook zsh)"
fi
#
# fzf
if (( $+commands[fzf] )); then
eval "$(fzf --zsh)"
fi
if (( $+commands[thefuck] )); then
eval $(thefuck --alias)
fi
# zoxide
if (( $+commands[zoxide] )); then
eval "$(zoxide init zsh --cmd cd)"
fi
# atuin
if (( $+commands[atuin] )); then
eval "$(atuin init zsh)"
fi
#
# # custom shell configurations
[ -e "$HOME/.zsh/aliases.zsh" ] && source "$HOME/.zsh/aliases.zsh"
[ -e "$HOME/.zsh/appearance.zsh" ] && source "$HOME/.zsh/appearance.zsh"
[ -e "$HOME/.zsh/completion.zsh" ] && source "$HOME/.zsh/completion.zsh"
[ -e "$HOME/.zsh/functions.zsh" ] && source "$HOME/.zsh/functions.zsh"
[ -e "$HOME/.zsh/keybindings.zsh" ] && source "$HOME/.zsh/keybindings.zsh"
[ -e "$HOME/.zsh/options.zsh" ] && source "$HOME/.zsh/options.zsh"
[ -f ~/.zsh.local ] && source ~/.zsh.local
fpath+=~/.zfunc