export XDG_CACHE_HOME=${XDG_CACHE_HOME:=~/.cache} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:=~/.config} export XDG_DATA_HOME=${XDG_DATA_HOME:=~/.local/share} if printf "$PATH"|grep -q ".local/bin"; then export PATH="$PATH:$HOME/.local/bin" fi HISTFILE=$XDG_DATA_HOME/zsh/histfile HISTSIZE=5000 SAVEHIST=5000 typeset -A ZPLGM ZPLG_HOME=$XDG_CACHE_HOME/zsh/zplugin ZPLGM[HOME_DIR]=$ZPLG_HOME ZPLGM[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump ZPLGM[COMPLETIONS_DIR]=$XDG_DATA_HOME/zsh/completions if [[ ! -f $ZPLG_HOME/bin/zplugin.zsh ]]; then git clone https://github.com/zdharma/zplugin $ZPLG_HOME/bin zcompile $ZPLG_HOME/bin/zplugin.zsh fi autoload -Uz _zplugin (( ${+_comps} )) && _comps[zplugin]=_zplugin source $ZPLG_HOME/bin/zplugin.zsh load=light #load zsh external configs for file in $ZDOTDIR/*.zsh; do source "$file" done #make fpath not contain all the completions I don't use (enable completions using "zplugin creinstall [PATH_TO_COMPLETIONS_FOLDER]") if [[ -d /usr/local/share/zsh ]]; then fpath=($XDG_DATA_HOME/zsh/completions /usr/local/share/zsh/site-functions /usr/local/share/zsh/$ZSH_VERSION/functions/Calendar /usr/local/share/zsh/$ZSH_VERSION/functions/Chpwd /usr/local/share/zsh/$ZSH_VERSION/functions/Completion /usr/local/share/zsh/$ZSH_VERSION/functions/Exceptions /usr/local/share/zsh/$ZSH_VERSION/functions/MIME /usr/local/share/zsh/$ZSH_VERSION/functions/Exceptions /usr/local/share/zsh/$ZSH_VERSION/functions/Math /usr/local/share/zsh/$ZSH_VERSION/functions/Exceptions /usr/local/share/zsh/$ZSH_VERSION/functions/Misc /usr/local/share/zsh/$ZSH_VERSION/functions/TCP /usr/local/share/zsh/$ZSH_VERSION/functions/VCS_Info /usr/local/share/zsh/$ZSH_VERSION/functions/VCS_Info/Backends /usr/local/share/zsh/$ZSH_VERSION/functions/Zftp /usr/local/share/zsh/$ZSH_VERSION/functions/Zle) else fpath=($XDG_DATA_HOME/zsh/completions /usr/share/zsh/site-functions /usr/share/zsh/$ZSH_VERSION/functions/Calendar /usr/share/zsh/$ZSH_VERSION/functions/Chpwd /usr/share/zsh/$ZSH_VERSION/functions/Completion /usr/share/zsh/$ZSH_VERSION/functions/Exceptions /usr/share/zsh/$ZSH_VERSION/functions/MIME /usr/share/zsh/$ZSH_VERSION/functions/Exceptions /usr/share/zsh/$ZSH_VERSION/functions/Math /usr/share/zsh/$ZSH_VERSION/functions/Exceptions /usr/share/zsh/$ZSH_VERSION/functions/Misc /usr/share/zsh/$ZSH_VERSION/functions/TCP /usr/share/zsh/$ZSH_VERSION/functions/VCS_Info /usr/share/zsh/$ZSH_VERSION/functions/VCS_Info/Backends /usr/share/zsh/$ZSH_VERSION/functions/Zftp /usr/share/zsh/$ZSH_VERSION/functions/Zle) fi # load shortcutrc and aliasrc to grab cross-shell niceties [ -f "$XDG_CONFIG_HOME/shortcutrc" ] && source "$XDG_CONFIG_HOME/shortcutrc" [ -f "$XDG_CONFIG_HOME/aliasrc" ] && source "$XDG_CONFIG_HOME/aliasrc" # plugin loading goes here: # theme zplugin ice silent depth=1 zplugin $load romkatv/powerlevel10k # Ctrl-R functionality zplugin $load zdharma/history-search-multi-word # completions zplugin ice blockf zplugin $load zsh-users/zsh-completions # good, fast syntax highlighting zplugin ice silent wait!1 atload"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit" zplugin $load zdharma/fast-syntax-highlighting # theme config loading [ -f "$ZDOTDIR/themes/p10k.zsh" ] && source "$ZDOTDIR/themes/p10k.zsh"