dotfiles/zsh/.zprofile

49 lines
1.0 KiB
Bash

# If you make changes to this, it's probably a good idea to log out.
[ -f $HOME/.nix-profile/etc/profile.d/nix.sh ] && source \
$HOME/.nix-profile/etc/profile.d/nix.sh
pathadd_head() {
if [ -d "$1" ] && ! echo "$PATH" | grep -q "$1" >/dev/null; then
PATH="$1${PATH:+":$PATH"}"
fi
}
pathadd_tail() {
if [ -d "$1" ] && ! echo "$PATH" | grep -q "$1" >/dev/null; then
PATH="${PATH:+"$PATH:"}$1"
fi
}
export EDITOR=nvim
pathadd_head "$HOME/.local/bin"
pathadd_head '/tmp/bin'
pathadd_head "$HOME/.config/emacs/bin"
if [[ $HOST == "core.envs.net" ]]; then
pathadd_tail '/envs/bin'
pathadd_head "$HOME/public_html/files/bin"
fi
if [[ $HOST == "tycho" ]]; then
pathadd_tail "$HOME/.wakatime"
fi
# rust
[ -f $HOME/.cargo/env ] && source $HOME/.cargo/env
# nim
pathadd_tail "$HOME/.nimble/bin"
# Preferences
export CALIBRE_USE_SYSTEM_THEME=0
export CALIBRE_USE_DARK_PALETTE=1
# macOS
[ -f /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)"
hash rbenv &>/dev/null && eval "$(rbenv init - zsh)"
export LOLCOMMITS_DELAY=2
export PATH