Dotfiles update 2026-01-02 14:14
This commit is contained in:
28
zsh/.zshrc
28
zsh/.zshrc
@@ -276,17 +276,17 @@ fi
|
|||||||
_deferred_load() {
|
_deferred_load() {
|
||||||
# Setup tool aliases
|
# Setup tool aliases
|
||||||
_setup_tool_aliases
|
_setup_tool_aliases
|
||||||
|
|
||||||
# Setup FZF
|
# Setup FZF
|
||||||
_has_cmd fzf && _setup_fzf
|
_has_cmd fzf && _setup_fzf
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# Load machine-specific configuration
|
# Load machine-specific configuration
|
||||||
# This must be loaded early so machine configs can override other settings
|
# This must be loaded early so machine configs can override other settings
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
local machines_lib="$_dotfiles_dir/zsh/lib/machines.zsh"
|
local machines_lib="$_dotfiles_dir/zsh/lib/machines.zsh"
|
||||||
[[ -f "$machines_lib" ]] && source "$machines_lib"
|
[[ -f "$machines_lib" ]] && source "$machines_lib"
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# Load all function files from functions directory
|
# Load all function files from functions directory
|
||||||
# Excludes command-palette.zsh (already loaded) and motd.zsh (loaded separately)
|
# Excludes command-palette.zsh (already loaded) and motd.zsh (loaded separately)
|
||||||
@@ -295,13 +295,13 @@ _deferred_load() {
|
|||||||
if [[ -d "$func_dir" ]]; then
|
if [[ -d "$func_dir" ]]; then
|
||||||
for func_file in "$func_dir"/*.zsh; do
|
for func_file in "$func_dir"/*.zsh; do
|
||||||
[[ -f "$func_file" ]] || continue
|
[[ -f "$func_file" ]] || continue
|
||||||
|
|
||||||
# Skip files that are loaded elsewhere
|
# Skip files that are loaded elsewhere
|
||||||
case "${func_file:t}" in
|
case "${func_file:t}" in
|
||||||
command-palette.zsh) continue ;; # Loaded early for keybindings
|
command-palette.zsh) continue ;; # Loaded early for keybindings
|
||||||
motd.zsh) continue ;; # Loaded after prompt
|
motd.zsh) continue ;; # Loaded after prompt
|
||||||
esac
|
esac
|
||||||
|
|
||||||
source "$func_file"
|
source "$func_file"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -342,14 +342,14 @@ else
|
|||||||
# Method 2: Use sched for deferred loading (built-in)
|
# Method 2: Use sched for deferred loading (built-in)
|
||||||
# Runs after first prompt is displayed
|
# Runs after first prompt is displayed
|
||||||
zmodload zsh/sched 2>/dev/null
|
zmodload zsh/sched 2>/dev/null
|
||||||
|
|
||||||
_first_prompt_hook() {
|
_first_prompt_hook() {
|
||||||
# Remove this hook after first run
|
# Remove this hook after first run
|
||||||
add-zsh-hook -d precmd _first_prompt_hook
|
add-zsh-hook -d precmd _first_prompt_hook
|
||||||
|
|
||||||
# Run deferred loading
|
# Run deferred loading
|
||||||
_deferred_load
|
_deferred_load
|
||||||
|
|
||||||
# Show MOTD after prompt
|
# Show MOTD after prompt
|
||||||
if [[ -f "$_dotfiles_dir/zsh/functions/motd.zsh" ]]; then
|
if [[ -f "$_dotfiles_dir/zsh/functions/motd.zsh" ]]; then
|
||||||
source "$_dotfiles_dir/zsh/functions/motd.zsh"
|
source "$_dotfiles_dir/zsh/functions/motd.zsh"
|
||||||
@@ -359,11 +359,11 @@ else
|
|||||||
full) show_motd_full ;;
|
full) show_motd_full ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Background tasks
|
# Background tasks
|
||||||
_background_tasks
|
_background_tasks
|
||||||
}
|
}
|
||||||
|
|
||||||
autoload -Uz add-zsh-hook
|
autoload -Uz add-zsh-hook
|
||||||
add-zsh-hook precmd _first_prompt_hook
|
add-zsh-hook precmd _first_prompt_hook
|
||||||
fi
|
fi
|
||||||
@@ -384,3 +384,11 @@ fi
|
|||||||
# End - Profiling output (uncomment zprof at top to use)
|
# End - Profiling output (uncomment zprof at top to use)
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# zprof
|
# zprof
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
|
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
|
eval "$(pyenv init --path)"
|
||||||
|
eval "$(pyenv init -)"
|
||||||
|
|||||||
Reference in New Issue
Block a user