# 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 # this is my zsh config. there are many like it, but this one is mine. # shellcheck shell=bash # Defaults export DOTFILES="$HOME/.dotfiles" # shellcheck source=scripts/shared.sh source "$DOTFILES/scripts/shared.sh" export COMPLETION_WAITING_DOTS=true # Run x-load-configs in your terminal to reload the files. function x-load-configs() { # Load the shell dotfiles, and then some: for file in $DOTFILES/config/{exports,alias,functions}; do [ -r "$file" ] && source "$file" [ -r "$file-secret" ] && source "$file-secret" [ -r "$file-$HOSTNAME" ] && source "$file-$HOSTNAME" [ -r "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret" done } x-load-configs export HISTFILE="$XDG_STATE_HOME"/zsh/history autoload -U colors zsh/terminfo colors setopt correct export ZSH_CUSTOM_COMPLETION_PATH="$XDG_CONFIG_HOME/zsh/completion" x-dc "$ZSH_CUSTOM_COMPLETION_PATH" # Add completion scripts to zsh path FPATH="$ZSH_CUSTOM_COMPLETION_PATH:$FPATH" autoload -Uz compinit if type brew &>/dev/null then FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" fi compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" # Import ssh keys in keychain ssh-add -A 2>/dev/null; # Try to load antigen, if present ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh" [[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH" # antigen is present have antigen && { antigen use oh-my-zsh # config/functions x-default-antigen-bundles antigen apply } # shellcheck source=../config/fzf/fzf.zsh [ -f "${DOTFILES}/config/fzf/fzf.zsh" ] \ && source "${DOTFILES}/config/fzf/fzf.zsh" # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. # shellcheck source=config/zsh/p10k.zsh export P10K_LOCATION="$XDG_CONFIG_HOME/zsh/p10k.zsh" [[ ! -f $P10K_LOCATION ]] || source "$P10K_LOCATION"