aboutsummaryrefslogtreecommitdiff
path: root/dot_zshrc.tmpl
blob: c19d20afabcf75420228ba699eafc3f583fa2023 (plain) (blame)
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
# Auto generated by chezmoi

{{ if eq .chezmoi.hostname "ubuntu" }}
if [ "$TMUX" = "" ]; then tmux new-session -A -s default; fi
{{ end }}

autoload -Uz compinit

{{ if eq .chezmoi.os "darwin" }}

export COMPINIT_IGNORE_INSECURE=1
compinit -u

{{ else }}

compinit

{{ end }}

setopt correctall

autoload -U promptinit
promptinit 

{{ if eq .chezmoi.hostname "gentoo" }}
prompt gentoo
{{ end }}

zstyle ':completion::complete:*' use-cache 1

export HISTFILE=~/.zsh_history
export SAVEHIST=1000
export HISTSIZE=1000

bindkey '^R'    history-incremental-search-backward
bindkey '^r' history-incremental-pattern-search-backward

setopt hist_ignore_space
setopt hist_ignore_dups
setopt appendhistory
unsetopt beep

export EDITOR='nvim'
alias vim='nvim'
alias cd='z'
alias ls='eza --icons=always'

{{ if eq .chezmoi.hostname "gentoo" }}

unset SSH_AGENT_PID

if [[ -n ${XDG_RUNTIME_DIR:-} ]]; then
    export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.sock"
fi

eval "$(mise activate zsh)"

[[ -r ~/.config/secrets/openrouter.env ]] && source ~/.config/secrets/openrouter.env

path+=("/home/pablu/.cargo/bin")
export PATH
{{ else if eq .chezmoi.os "darwin" }}

eval "$(/opt/homebrew/bin/brew shellenv)"
PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
export PATH

{{ else if eq .chezmoi.hostname "ubuntu" }}
path+=("/home/ubuntu/nvim-linux-x86_64/bin")
export PATH
{{ end }}

source <(chezmoi completion zsh)
eval "$(starship init zsh)"
eval "$(zoxide init zsh)"

{{ if ne .chezmoi.hostname "ubuntu" }}
source <(herdr completion zsh)
source <(COMPLETE=zsh jj)
{{ end }}

{{ if eq .chezmoi.hostname "gentoo" }}

eval "$(direnv hook zsh)"
source /usr/share/zsh/site-functions/zsh-autosuggestions.zsh
source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh
source <(diple completion zsh)
source <(zw completion zsh)

{{ else if eq .chezmoi.os "darwin" }}

source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source <(kubectl completion zsh)
source <(kubebuilder completion zsh)
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

{{ else if eq .chezmoi.hostname "ubuntu" }}

eval "$(direnv hook zsh)"
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh

{{ end }}

{{ if ne .chezmoi.hostname "ubuntu"}}
fastfetch
{{ end }}