Files
dotfiles/dot_config/zsh/dot_zshrc
T

37 lines
2.1 KiB
Plaintext

# ════════════════════════════════════════════════════════════
# Ada's Modular ZSH Configuration
# ════════════════════════════════════════════════════════════
# ═══ Powerlevel10k Instant Prompt ══════════════════════════
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
# ═══ Zinit (Plugin Manager) ════════════════════════════════
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
if [[ ! -d "$ZINIT_HOME" ]]; then
print -P "%F{blue}▓▒░ Установка zinit...%f"
mkdir -p "$(dirname $ZINIT_HOME)"
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
fi
source "${ZINIT_HOME}/zinit.zsh"
# ═══ Загрузка модулей ══════════════════════════════════════
ZSH_CONFIG_DIR="${ZDOTDIR}/config"
source "${ZSH_CONFIG_DIR}/env.zsh"
source "${ZSH_CONFIG_DIR}/options.zsh"
source "${ZSH_CONFIG_DIR}/plugins.zsh"
source "${ZSH_CONFIG_DIR}/completion.zsh"
source "${ZSH_CONFIG_DIR}/aliases.zsh"
source "${ZSH_CONFIG_DIR}/functions.zsh"
source "${ZSH_CONFIG_DIR}/keybindings.zsh"
source "${ZSH_CONFIG_DIR}/prompt.zsh"
# ═══ Локальные настройки ═══════════════════════════════════
[[ -f "${ZSH_CONFIG_DIR}/local.zsh" ]] && source "${ZSH_CONFIG_DIR}/local.zsh"
[[ -f "${ZDOTDIR}/.p10k.zsh" ]] && source "${ZDOTDIR}/.p10k.zsh"
# ═══ Fastfetch ══════════════════════════════════════════════
[[ -z "$TMUX" && "$TERM_PROGRAM" == "kitty" ]] && fastfetch