dotfiles/.config/zsh/.zshrc

41 lines
1.3 KiB
Bash

#!/usr/bin/env zsh
# Scripts that should be loaded before instant prompt
# because they ask something in prompt
source ${ZDOTDIR:-$HOME}/.before.zshrc.zsh
# Enable Powerlevel10k instant prompt. Should stay close to the top of .zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Load fzf
source /usr/share/fzf/completion.zsh
source /usr/share/fzf/key-bindings.zsh
# Clone antidote if necessary.
if [[ ! -d ${ZDOTDIR:-$HOME}/.antidote ]]; then
git clone https://github.com/mattmc3/antidote ${ZDOTDIR:-$HOME}/.antidote
fi
# Create an amazing Zsh config using antidote plugins.
source ${ZDOTDIR:-$HOME}/.antidote/antidote.zsh
antidote load
# Enlève le prompt de droite après avoir appuyé sur Entrée
setopt transient_rprompt
# Source anything in .zshrc.d.
for _rc in ${ZDOTDIR:-$HOME}/.zshrc.d/*.zsh; do
# Ignore tilde files.
if [[ $_rc:t != '~'* ]]; then
source "$_rc"
fi
done
unset _rc
# To customize prompt, run `p10k configure` or edit .p10k.zsh.
[[ ! -f ${ZDOTDIR:-$HOME}/.p10k.zsh ]] || source ${ZDOTDIR:-$HOME}/.p10k.zsh