40 lines
1.4 KiB
Bash
Executable file
40 lines
1.4 KiB
Bash
Executable file
#!/usr/bin/env zsh
|
|
# ~/.zshrc - Interactive shell configuration
|
|
|
|
# Vanilla mode for dumb terminals (IDEs, Windsurf, etc.)
|
|
if [ "$TERM" = "dumb" ]; then
|
|
# Keep IDE shells as vanilla as possible, but still set a simple prompt.
|
|
typeset -g zsh_config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
|
|
source "$zsh_config_dir/external.zsh"
|
|
return 0
|
|
fi
|
|
|
|
# Performance profiling (run with: ZSH_PROFILE=1 zsh)
|
|
if [[ -n $ZSH_PROFILE ]]; then
|
|
zmodload zsh/zprof
|
|
fi
|
|
|
|
# Ensure unique PATH entries
|
|
typeset -U PATH path cdpath fpath manpath
|
|
|
|
# Load configuration modules in optimized order
|
|
typeset -g zsh_config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
|
|
source "$zsh_config_dir/external.zsh"
|
|
source "$zsh_config_dir/completion.zsh"
|
|
source "$zsh_config_dir/plugins.zsh"
|
|
source "$zsh_config_dir/aliases.zsh"
|
|
|
|
# FZF integration (load last for keybindings)
|
|
if [[ -f "$HOME/.fzf.zsh" ]]; then
|
|
source "$HOME/.fzf.zsh"
|
|
fi
|
|
|
|
# SSH environment fallback
|
|
[[ -n "$SSH_CONNECTION" && -z "$EDITOR" ]] && export EDITOR='vim'
|
|
|
|
# Show profiling results
|
|
if [[ -n $ZSH_PROFILE ]]; then
|
|
zprof
|
|
fi
|
|
# Zoxide FZF theme colors (managed by theme-switcher)
|
|
export _ZO_FZF_OPTS="--height 40% --layout=reverse --border --preview-window=down:3:wrap --color=fg:#f8f8f2,bg:#2a2f3b,hl:#f92672,fg+:#f8f8f2,bg+:#49483e,hl+:#f92672,info:#a6e22e,prompt:#66d9ef,pointer:#f92672,marker:#a6e22e,spinner:#a6e22e,header:#66d9ef"
|