-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc
95 lines (80 loc) · 2.33 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
export OS="$(uname -s)"
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
if [ "$OS" = "Darwin" ]; then
# CodeWhisperer pre block. Keep at the top of this file.
[[ -f "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.pre.zsh" ]] && builtin source "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.pre.zsh"
fi
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
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
fi
if [ "$OS" = "Darwin" ]; then
source $HOME/.zsh/macos.zsh
else
export PATH="$HOME/bin:$PATH"
source "/usr/share/doc/fzf/examples/key-bindings.zsh"
source "/usr/share/doc/fzf/examples/completion.zsh"
fi
source $HOME/.zsh/zim-init.zsh
if (( $+commands[luarocks] )) then
export PATH="$HOME/.luarocks/bin:$PATH"
fi
export PATH="$HOME/.bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
if (( $+commands[go] )) then
path=($HOME/go/bin $path)
fi
# pnpm
export PNPM_HOME="/Users/jamesbombeelu/Library/pnpm"
export PATH="$PNPM_HOME:$PATH"
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
export HISTORY_IGNORE="(fg|ls|exit)"
if (( $+commands[chezmoi] ))
then
function dot() {
cd "$HOME/.local/share/chezmoi/"
}
alias config="dot"
fi
if (( $+commands[nvim] ))
then
export VISUAL="nvim"
export EDITOR="nvim"
export NEOVIDE_MULTIGRID=false
function vimrc() {
eval "$(chezmoi source-path ~/.config/nvim)"
}
else
export VISUAL="vim"
export EDITOR="vim"
fi
if (( $+commands[delta] ))
then
alias diff="delta"
fi
if [[ $TERM = "xterm-kitty" ]]
then
source $HOME/.zsh/kitty.zsh
fi
if (( $+commands[eza] ))
then
alias exa="eza"
alias l='eza'
alias ll='eza -l --git'
alias ls="eza --ignore-glob='.DS_Store'"
fi
if (( $+commands[zoxide] ))
then
eval "$(zoxide init zsh)"
fi
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
(( ! ${+functions[p10k-instant-prompt-finalize]} )) || p10k-instant-prompt-finalize
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
if [ "$OS" = "Darwin" ]; then
# CodeWhisperer post block. Keep at the bottom of this file.
[[ -f "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.post.zsh" ]] && builtin source "${HOME}/Library/Application Support/codewhisperer/shell/zshrc.post.zsh"
fi
else
eval "$(starship init zsh)"
fi