74 lines
2.4 KiB
Bash
74 lines
2.4 KiB
Bash
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" ]]; 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"
|
|
|
|
export LIBVIRT_DEFAULT_URI="qemu:///system"
|
|
if (( ! shared_config )); then
|
|
(( $+commands[safecp] )) && alias cp=safecp
|
|
(( $+commands[safemv] )) && alias mv=safemv
|
|
(( $+commands[safescp] )) && alias scp=safescp
|
|
fi
|
|
|
|
[[ -f ~/.zsh/.mac_config ]] && source ~/.zsh/.mac_config
|
|
|
|
if zmodload zsh/terminfo && (( terminfo[colors] >= 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
|