-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc.tmpl
126 lines (101 loc) · 3.21 KB
/
dot_zshrc.tmpl
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
# Setup the 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
[ -d "/usr/local/go/bin" ] && \
export PATH="/usr/local/go/bin:$PATH"
[ -d "$HOME/.spicetify" ] && \
export PATH="$HOME/.spicetify:$PATH"
[ -d "$HOME/.local/funcheck/host" ] && \
export PATH="$HOME/.local/funcheck/host:$PATH"
[ -d "/nix" ] && [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ] && \
source "$HOME/.nix-profile/etc/profile.d/nix.sh"
export PATH="$HOME/.local/bin:$PATH"
##start oh-my-zsh
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"
DISABLE_MAGIC_FUNCTIONS="true"
zstyle ':omz:update' mode disabled # disable automatic updates
plugins=(
zsh-edit
zsh-syntax-highlighting
zsh-autosuggestions
zsh-bash-completions-fallback
)
fpath=(
"$HOME/.local/share/zsh/site-functions/"
"${ZSH_CUSTOM:-${ZSH:-$HOME/.oh-my-zsh}/custom}/plugins/zsh-completions/src"
${fpath[@]}
)
source $ZSH/oh-my-zsh.sh
##end oh-my-zsh
export EDITOR="nvim"
export LESS="--mouse --wheel-lines=3 -R"
eval "$(chezmoi completion zsh)"
alias cm=chezmoi
alias cmg="cm git --"
alias cmgs="cmg status"
alias cmgd="cmg diff"
alias cmgds="cmg diff --staged"
alias cmgc="cmg commit"
alias cmgcm="cmg commit -m"
alias cmgca="cmg commit --amend"
alias cmga="cmg add"
alias cmgaa="cmg add ."
alias g="git"
alias gs="git status"
alias gd="git diff"
alias gds="git diff --staged"
alias gc="git commit"
alias gcm="git commit -m"
alias gca="git commit --amend"
alias ga="git add"
alias gaa="git add ."
alias gcl="git clone"
alias wm="watchmaker"
if command -v toolbox &>/dev/null; then
alias te="toolbox enter"
fi
if command -v distrobox &>/dev/null; then
alias de="distrobox enter"
fi
{{ if (or (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.osRelease.id "ubuntu")) -}}
if command -v batcat &>/dev/null; then
{{ else -}}
if command -v bat &>/dev/null; then
{{- end }}
alias cat=bat
alias man="MANPAGER=\"sh -c 'col -bx | bat -l man -p'\" MANROFFOPT='-c' man"
alias -g -- -h='-h 2>&1 | bat --language=help --style=plain'
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
fi
if command -v eza &>/dev/null; then
alias ls="eza --group-directories-first"
alias ll="eza --group-directories-first -l --git"
alias lla="eza --group-directories-first -l --git -a"
alias tree="eza --group-directories-first -T --git"
fi
if command -v fzf &>/dev/null; then
export FZF_DEFAULT_OPTS=" \
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
--color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 \
--color=selected-bg:#45475a \
--bind alt-j:down,alt-k:up \
--multi"
source <(fzf --zsh)
fi
if command -v direnv &>/dev/null; then
export DIRENV_LOG_FORMAT=""
eval "$(direnv hook zsh)"
fi
if command -v zoxide &>/dev/null; then
eval "$(zoxide init --cmd cd zsh)"
fi
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh