3 # This file sets up the environment correctly. It gets run for every shell,
4 # so it must be fast. Also, starting a shell within a shell shouldn't change
5 # the environment. The path manipulation functions are useful for this.
7 # Root gets the default umask. Files created by my user are only rwx by user/group
8 if [ "$(id -un)" = "root" ]; then
14 # General environment settings
16 export PYTHONSTARTUP="${HOME}/.pythonrc.py"
17 export EMAIL="James Bunton <jamesbunton@delx.net.au>"
20 if emacsclient --version &> /dev/null; then
21 export ALTERNATE_EDITOR="vim"
22 export EDITOR="emacsclient --tty"
24 if [[ "$TERM" == screen* ]]; then
25 export EDITORBG="$EDITOR"
27 export EDITORBG="emacsclient --create-frame --no-wait"
34 source "${HOME}/.bash/functions"
36 pathprepend "${HOME}/bin"
38 # Pick up SSH agent socket in case it isn't set automatically
39 if [ -z "$SSH_AUTH_SOCK" ]; then
40 export SSH_AUTH_SOCK="/run/user/$(id -u)/keyring/ssh"
43 # Load local environment settings
44 [ -r "${HOME}/.bash/environment_local" ] && source "${HOME}/.bash/environment_local"