2020-02-09 00:22:49 +00:00
|
|
|
source_if_exists() {
|
|
|
|
if [[ -f $1 ]]; then
|
|
|
|
source $1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# Check if zplug is installed
|
|
|
|
if [[ ! -d ~/.zplug ]]; then
|
|
|
|
git clone https://github.com/b4b4r07/zplug ~/.zplug
|
|
|
|
fi
|
|
|
|
source ~/.zplug/init.zsh
|
|
|
|
|
|
|
|
# Spaceship theme
|
|
|
|
zplug "denysdovhan/spaceship-prompt", use:spaceship.zsh, from:github, as:theme
|
|
|
|
|
|
|
|
# Oh my zsh lugins
|
|
|
|
# sudo must start after vi-mode for it to work properly
|
|
|
|
zplug "plugins/docker", from:oh-my-zsh
|
|
|
|
zplug "plugins/docker-compose", from:oh-my-zsh
|
|
|
|
zplug "plugins/extract", from:oh-my-zsh
|
|
|
|
zplug "plugins/git", from:oh-my-zsh
|
|
|
|
zplug "plugins/gitignore", from:oh-my-zsh
|
|
|
|
zplug "plugins/ripgrep", from:oh-my-zsh
|
|
|
|
zplug "plugins/rsync", from:oh-my-zsh
|
|
|
|
zplug "plugins/systemd", from:oh-my-zsh
|
|
|
|
zplug "plugins/tmux", from:oh-my-zsh
|
|
|
|
zplug "plugins/vi-mode", from:oh-my-zsh
|
|
|
|
zplug "plugins/sudo", from:oh-my-zsh
|
|
|
|
zplug "zsh-users/zsh-autosuggestions", from:github, defer:3
|
|
|
|
zplug "zsh-users/zsh-syntax-highlighting", from:github, defer:3
|
|
|
|
|
|
|
|
# Install packages
|
|
|
|
if ! zplug check --verbose; then
|
|
|
|
printf "Install zplug plugins? [y/N]: "
|
|
|
|
if read -q; then
|
|
|
|
echo
|
|
|
|
zplug install
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
zplug load
|
2016-11-09 13:09:59 +00:00
|
|
|
|
2019-03-29 18:51:29 +00:00
|
|
|
# nvim alias
|
|
|
|
alias vim="nvim"
|
2019-06-01 12:03:38 +00:00
|
|
|
alias vi="nvim"
|
2019-03-29 18:51:29 +00:00
|
|
|
|
2020-02-09 00:22:49 +00:00
|
|
|
# ls alias
|
|
|
|
alias ls="exa"
|
|
|
|
alias l="exa -al"
|
|
|
|
|
2019-03-29 18:51:29 +00:00
|
|
|
# vifm alias
|
|
|
|
alias vifm="vifmrun"
|
|
|
|
|
2016-12-30 20:07:59 +00:00
|
|
|
# Refresh gpg-agent tty in case user switches into an X session
|
|
|
|
gpg-connect-agent updatestartuptty /bye >/dev/null
|
|
|
|
|
2020-02-09 00:22:49 +00:00
|
|
|
source_if_exists ~/.fzf/key-bindings.zsh
|
|
|
|
source_if_exists ~/.fzf/completion.zsh
|
|
|
|
|
2016-12-29 13:17:16 +00:00
|
|
|
neofetch
|