# PATH and environment shared by every machine. # # Entries are added only if the directory exists. The list this replaces # carried ~/bin, ~/.scripts and /usr/X11R6/bin, none of which are present on # this machine - a PATH full of missing directories costs a stat on every # lookup and hides the fact that something was never installed. # # It also exported PYTHONPATH=/usr/lib/python3.9/site-packages. Python here is # 3.14 and that directory does not exist; pointing PYTHONPATH at a missing # 3.9 tree is at best inert and at worst confusing, so it is gone. # $HOME rather than a hardcoded /home/templis: the Mac puts it under /Users. _path_add() { [[ -d "$1" ]] || return 0 case ":$PATH:" in *":$1:"*) ;; *) PATH="$1:$PATH" ;; esac } _path_add "$HOME/.local/bin" # pipx _path_add "$HOME/perl5/bin" # local::lib _path_add "$HOME/bin" _path_add "$HOME/.scripts" export PATH unfunction _path_add # local::lib, only where it is actually set up. if [[ -d "$HOME/perl5/lib/perl5" ]]; then export PERL5LIB="$HOME/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}" export PERL_LOCAL_LIB_ROOT="$HOME/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}" export PERL_MB_OPT="--install_base \"$HOME/perl5\"" export PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" fi export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border' # ghostty announces itself but its terminfo is not everywhere, which leaves # remote hosts unable to draw anything. if [[ "$TERM_PROGRAM" == "ghostty" ]]; then export TERM=xterm-256color fi # powerlevel10k's own configuration, where it exists. [[ ! -f "$HOME/.p10k.zsh" ]] || source "$HOME/.p10k.zsh"