#
# ~/.profile -- Included by .bash_profile, i.e. sourced in login shells.
# Includes ~/.config/profile.d/*
#

# GPG key stuff
export GPG_TTY=$(tty)

# Set terminal type to support colors
export TERM=xterm-color

# Preferred editor
export EDITOR=vim

# Set PATH
[[ -d "$HOME/.local/bin" ]] && export PATH="$HOME/.local/bin:$PATH"
[[ -d "$HOME/bin" ]] && export PATH="$HOME/bin:$PATH"

# Settings for bc
export BC_ENV_ARGS="-lq"
[[ -f "$HOME/.bcrc" ]] && export BC_ENV_ARGS="$BC_ENV_ARGS $HOME/.bcrc"

# Include drop-in files
if [[ -d ~/.config/profile.d ]]; then
	for f in ~/.config/profile.d/*; do
		[[ -f $f ]] && source "$f"
	done
fi

# Deprecation warning for .profile.local
if [[ -e ~/.profile.local ]]; then
	echo "WARNING: ~/.profile.local is ignored, please use ~/.config/profile.d/ instead."
fi
