dotfiles/zsh/zprofile

50 lines
1.2 KiB
Bash

# vim: filetype=zsh
if [[ -d $HOME/.config/dotfiles/zsh ]]; then
SCRIPTPATH=$HOME/.config/dotfiles/zsh
else if [[ -d $HOME/dotfiles/zsh ]]; then
SCRIPTPATH=$HOME/dotfiles/zsh
fi
ZSH_CACHE_DIR="$HOME/.cache/zsh"
# Let GPG know which tty we're using and put in charge of SSH auth
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
# google cloud sdk
if [[ -a "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc" ]]; then
source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
fi
# homebrew
if [[ -a "/opt/homebrew/bin/brew" ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# asdf
if [[ -d "$HOME/.asdf/shims" ]]; then
export PATH="$HOME/.asdf/shims:$PATH"
fi
# plugins
mkdir -p "$ZSH_CACHE_DIR"
source "$SCRIPTPATH/dotenv.zsh"
# other files
source "$SCRIPTPATH/functions.zsh"
source "$SCRIPTPATH/aliases.zsh"
# private aliases
if [[ -a "$SCRIPTPATH/private.zsh" ]]; then
source $SCRIPTPATH/private.zsh
fi
# What OS are we running?
if [[ $(uname) == "Darwin" ]]; then
source $SCRIPTPATH/mac.zsh
else
# Assume *nix of some kind
source $SCRIPTPATH/linux.zsh
fi