]> code.delx.au - dotfiles/blob - .bash/environment
fontconfig: -apple-system font
[dotfiles] / .bash / environment
1 #! bash
2
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.
6
7 # Root gets the default umask. Files created by my user are only rwx by user/group
8 if [ "$(id -un)" = "root" ]; then
9 umask 0022
10 else
11 umask 0007
12 fi
13
14 # General environment settings
15 export PAGER="less"
16 export PYTHONSTARTUP="${HOME}/.pythonrc.py"
17 export EMAIL="James Bunton <jamesbunton@delx.net.au>"
18
19 # Editor settings
20 if emacsclient --version &> /dev/null; then
21 export ALTERNATE_EDITOR="vim"
22 export EDITOR="emacsclient --tty"
23
24 if [[ "$TERM" == screen* ]]; then
25 export EDITORBG="$EDITOR"
26 else
27 export EDITORBG="emacsclient --create-frame --no-wait"
28 fi
29 else
30 export EDITOR="vim"
31 export EDITORBG="vim"
32 fi
33
34 # Expand any symbolic links in the TMPDIR environment variable
35 [ -n "$TMPDIR" ] && export TMPDIR="$(cd "${TMPDIR}" && pwd -P)"
36
37 # Load the bash functions
38 source "${HOME}/.bash/functions"
39
40 # The current directory shouldn't be in the path
41 pathremove .
42
43 # Load local environment settings
44 [ -r "${HOME}/.bash/environment_local" ] && source "${HOME}/.bash/environment_local"
45
46 # ~/bin should be in the front of path if it exists
47 pathprepend "${HOME}/bin"
48