65 lines
2.0 KiB
Bash
65 lines
2.0 KiB
Bash
# Запрет чтения настроек из системного каталога /etc
|
|
unsetopt GLOBAL_RCS
|
|
|
|
# PATH {{{
|
|
# Ruby
|
|
if which ruby >/dev/null && which gem >/dev/null; then
|
|
path=("$(ruby -r rubygems -e 'puts Gem.user_dir')/bin" $path)
|
|
fi
|
|
|
|
# Поиск в домашнем каталоге
|
|
path=("$HOME/bin" "$HOME/.local/bin" $path)
|
|
|
|
# Удалить дубликаты в массиве
|
|
typeset -aU path
|
|
# }}}
|
|
|
|
# Базовые каталоги {{{
|
|
export XDG_CONFIG_HOME="$HOME/.config"
|
|
export XDG_CACHE_HOME="$HOME/.cache"
|
|
export XDG_DATA_HOME="$HOME/.local/share"
|
|
export XDG_STATE_HOME="$HOME/.local/state"
|
|
# }}}
|
|
|
|
export ZSH_CACHE_DIR="$XDG_CACHE_HOME/zsh"
|
|
export ZSH_COMPDUMP="$ZSH_CACHE_DIR/zcompdump-${HOST/.*/}-$ZSH_VERSION"
|
|
|
|
# Отключаем некоторые плагины, если запуск в качестве подоболочки mc
|
|
# Bug: https://midnight-commander.org/ticket/4253
|
|
[ "$(ps -p $PPID -o cmd=)" = "mc" ] && ZSH_MC_SUBSHELL=1
|
|
|
|
# GnuPG
|
|
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
|
|
|
|
# ASKPASS {{{
|
|
if [ -n ${DISPLAY+set} ]; then
|
|
if command -v /usr/lib/openssh/gnome-ssh-askpass 2>&1 >/dev/null; then
|
|
export SSH_ASKPASS=/usr/lib/openssh/gnome-ssh-askpass
|
|
elif command -v /usr/bin/lxqt-openssh-askpass 2>&1 >/dev/null; then
|
|
export SSH_ASKPASS=/usr/bin/lxqt-openssh-askpass
|
|
elif command -v /usr/bin/ssh-askpass 2>&1 >/dev/null; then
|
|
export SSH_ASKPASS=/usr/bin/ssh-askpass
|
|
fi
|
|
fi
|
|
# }}}
|
|
|
|
# Настройка uncrustify
|
|
export UNCRUSTIFY_CONFIG="${XDG_CONFIG_HOME}/uncrustify/uncrustify.cfg"
|
|
[ ! -r "${UNCRUSTIFY_CONFIG}" ] && unset UNCRUSTIFY_CONFIG
|
|
|
|
# Настройка Intel Studio
|
|
if [ -n ${ENABLE_INTEL_STUDIO+set} ]; then
|
|
#export COMPILERVARS_ARCHITECTURE=intel64
|
|
#export COMPILERVARS_PLATFORM=linux
|
|
INTEL_VARS=( /opt/intel/oneapi/advisor/latest/advixe-vars.sh
|
|
/opt/intel/oneapi/compiler/latest/env/vars.sh
|
|
/opt/intel/vtune_profiler/vtune-vars.sh )
|
|
|
|
for f in ${INTEL_VARS[*]}; do
|
|
[ -r "$f" ] && source "$f" > /dev/null
|
|
done
|
|
fi
|
|
|
|
[ -r "$ZDOTDIR/.zshenv.user" ] && source "$ZDOTDIR/.zshenv.user"
|
|
|