export PATH="/snap/bin:$HOME/.local/bin:$PATH" export XDG_CONFIG_HOME="$HOME/.config" [[ -z $SSH_AUTH_SOCK ]] || export FORWARD_SOCK=$SSH_AUTH_SOCK [[ -f ~/.zsh/.powerline_config ]] && source ~/.zsh/.powerline_config if [[ -f ~/.zsh/.shared_config && "$SUDO_USER" != (fabian|ising|fi545621) ]]; then shared_config=1 else shared_config=0 fi # Work around snap's HOME handling for root. if [[ "$USER" == "root" ]]; then if [[ ! -e /home/root ]]; then ln -s /root/ /home/root elif [[ ! -e /home/root/.config ]]; then ln -s /root/.config /home/root/.config fi fi [[ -f ~/.zsh/.shared_config ]] && touch ~/.config/nvim/.shared_config source "${ZDOTDIR:-$HOME}/.zsh/lib/updates.zsh" if (( ! shared_config )); then export GIT_AUTHOR_NAME="Fabian Ising" export GIT_AUTHOR_EMAIL="f.ising@fh-muenster.de" export GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME export GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL fi # Completions for tools installed under ~/.local (e.g. tools-repo's safe* # wrappers). Must precede antidote, whose completion plugin runs compinit. fpath=("$HOME/.local/share/zsh/site-functions" $fpath) static_file=${ZDOTDIR:-$HOME}/.cache/zsh/.zsh_plugins.zsh if (( ! shared_config )); then plugins_txt=${ZDOTDIR:-$HOME}/.zsh/.zsh_plugins.txt bindkey -v VI_MODE_SET_CURSOR=true else plugins_txt=${ZDOTDIR:-$HOME}/.zsh/.zsh_plugins_shared.txt static_file=${ZDOTDIR:-$HOME}/.cache/zsh/.zsh_shared_plugins.zsh fi source "${ZDOTDIR:-$HOME}/.zsh/lib/antidote.zsh" export SSH_REAL_SOCK=$SSH_AUTH_SOCK [[ -z $FORWARD_SOCK ]] || export SSH_AUTH_SOCK=$FORWARD_SOCK source "${ZDOTDIR:-$HOME}/.zsh/lib/interactive.zsh" # fzf keys (Ctrl-R/Ctrl-T/Alt-C, **); after antidote, whose vi-mode rebinds ^R. # --zsh needs fzf >= 0.48; older apt builds ship the scripts instead. if (( $+commands[fzf] && ! shared_config )); then if _fzf_init=$(fzf --zsh 2>/dev/null); then eval "$_fzf_init" else for _fzf_init in /usr/share/doc/fzf/examples/{key-bindings,completion}.zsh; do [[ -r $_fzf_init ]] && source $_fzf_init done fi unset _fzf_init fi export LIBVIRT_DEFAULT_URI="qemu:///system" if (( ! shared_config )); then # Agent shells: = 256 )) && (( ! shared_config )); then p10k_config=~/dotfiles/zsh/.p10k.zsh else p10k_config=~/dotfiles/zsh/.p10k_shared.zsh fi source "${ZDOTDIR:-$HOME}/.zsh/lib/prompt.zsh" [[ -f ~/.zsh/.user_config ]] && source ~/.zsh/.user_config [[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh [[ -f ~/.zsh/.local_config ]] && source ~/.zsh/.local_config [[ -f ~/.zsh/.os_config.zsh ]] && source ~/.zsh/.os_config.zsh typeset -U path PATH