zsh/plugins.zsh

72 lines
2.1 KiB
Bash

# Менеджер плагинов zinit
if [ ! -d $ZINIT[HOME_DIR] ]; then
git clone https://github.com/zdharma/zinit $ZINIT[HOME_DIR]
zcompile $ZINIT[HOME_DIR]/zinit.zsh
fi
source $ZINIT[HOME_DIR]/zinit.zsh
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# Плагины
zinit load willghatch/zsh-saneopt
zinit load mafredri/zsh-async
zinit load zsh-users/zsh-history-substring-search
zinit load rupa/z
if [[ "$DISPLAY" != '' ]] && command -v xdotool > /dev/null 2>&1 && command -v wmctrl > /dev/null 2>&1; then
zinit load marzocchi/zsh-notify
zstyle ':notify:*' expire-time 5000
zstyle ':notify:*' command-complete-timeout 20
zstyle ':notify:*' enable-on-ssh yes
zstyle ':notify:*' always-check-active-window yes
fi
if command -v peco > /dev/null 2>&1; then
zinit load jimeh/zsh-peco-history
fi
zinit snippet OMZP::command-not-found
zinit snippet OMZP::common-aliases
zinit snippet OMZP::debian
if command -v fzf > /dev/null 2>&1; then
export DISABLE_FZF_KEY_BINDINGS=true
zinit snippet OMZP::fzf
# fzf
if [ -e /usr/share/doc/fzf/examples/key-bindings.zsh ]; then
. /usr/share/doc/fzf/examples/key-bindings.zsh
fi
if [ -e /usr/share/doc/fzf/examples/completion.zsh ]; then
. /usr/share/doc/fzf/examples/completion.zsh
fi
fi
if command -v git > /dev/null 2>&1; then
zinit snippet OMZP::git
zinit load paulirish/git-open
zinit lucid wait'2' for \
as"program" pick"$ZPFX/bin/git-*" \
src"etc/git-extras-completion.zsh" make"PREFIX=$ZPFX" tj/git-extras \
as"program" make"PREFIX=$ZPFX install" Fakerr/git-recall \
as"program" load davidosomething/git-my
fi
if command -v psql > /dev/null 2>&1; then
zinit snippet OMZP::postgres
fi
if command -v sudo > /dev/null 2>&1; then
zinit snippet OMZP::sudo
fi
if command -v systemctl > /dev/null 2>&1; then
zinit snippet OMZP::systemd
fi
if command -v vim > /dev/null 2>&1; then
zinit snippet OMZP::vim-interaction
fi
zinit snippet OMZP::web-search
zinit load djui/alias-tips
zstyle ':prezto:module:tmux:auto-start' local 'no'
zstyle ':prezto:module:tmux:auto-start' remote 'no'
zstyle ':prezto:module:tmux:session' name "$(hostname)"
zinit snippet PZTM::tmux