dotfiles/dot_config/zsh/dot_zshrc.tmpl

43 lines
1.4 KiB
Cheetah

test -v DISTROBOX_HOST_HOME && { unset ZDOTDIR; exec zsh } # fix distrobox
test "x$TERMINALNAME" = "xalacritty" && eval "$(zellij setup --generate-auto-start zsh)" # autostart zellij only in alacritty
# options
setopt NO_CLOBBER INTERACTIVE_COMMENTS HASH_EXECUTABLES_ONLY NUMERIC_GLOB_SORT
unsetopt FLOW_CONTROL
# deduplicate path
typeset -U path PATH
path+=("$XDG_DATA_HOME"/JetBrains/Toolbox/scripts) # jetbrains toolbox
path+=("$HOME"/.local/bin) # local bin
# startup banner
potentialBanner=('joke bofh' 'joke dad' 'fastfetch')
eval "$potentialBanner[$RANDOM%$#potentialBanner+1]"
# antidote
{{- if eq .chezmoi.osRelease.id "endeavouros" }}
source '/usr/share/zsh-antidote/antidote.zsh'
{{- else }}
test -r "$XDG_DATA_HOME"/antidote/antidote.zsh || git clone https://github.com/mattmc3/antidote.git "$XDG_DATA_HOME"/antidote
source "$XDG_DATA_HOME"/antidote/antidote.zsh
{{- end }}
zstyle ':antidote:bundle' use-friendly-names 'yes'
antidote load
# load programs
_evalcache zoxide init --cmd cd zsh
_evalcache atuin init zsh
_evalcache navi widget zsh
_evalcache direnv hook zsh
# source files
source "$ZDOTDIR"/files/aliases.zsh
# completion files
source "$ZDOTDIR"/files/sshcomp.zsh
# local overrides
for sourced in "$XDG_DATA_HOME"/zsh/files/*; do source $sourced; done
# theme
eval "$(oh-my-posh init zsh --config="$XDG_CACHE_HOME/oh-my-posh/themes/emodipt-extend.omp.json")"