# environment ## prevent python from crapping all over the filesystem export PYTHONDONTWRITEBYTECODE=1 ## put XDG_RUNTIME_DIR crap under .cache ## not the optimal solution, but should be ## good enough in practice ## TODO: maybe look into setting up something ## better, perhaps with pam ## auto-creating and cleaning a per-boot dir export XDG_RUNTIME_DIR=${HOME}/.cache/ # colors for less export LESS="-iR" export LESS_TERMCAP_mb=$'\E[01;36m' export LESS_TERMCAP_md=$'\E[01;36m' export LESS_TERMCAP_me=$'\E[0m' export LESS_TERMCAP_se=$'\E[0m' export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' export LESS_TERMCAP_us=$'\E[11;32m' ## set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi # ups.khirnov.net uploader ups() { if [ "$1" ]; then fname=$(basename "$1") else fname="-" fi url=$(curl -sS -E ~/.local/var/up/cert --data-binary "@${fname}" "https://ups.khirnov.net/${fname}") [ "${url}" ] && echo "${url}" } # up.khirnov.net 0x0 instance up() { if [ "$1" ]; then fname=$(basename "$1") else fname="-" fi url=$(curl -sS -E ~/.local/var/up/cert -F "file=@${fname}" "https://up.khirnov.net/") [ "${url}" ] && echo "${url}" } # TODO: umask? # source the machine-local configuration [ -r "$HOME/.config/profile_local.sh" ] && . "$HOME/.config/profile_local.sh" # when running bash, include .bashrc if it exists if [ -n "$BASH_VERSION" -a -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi