summaryrefslogtreecommitdiff
path: root/dotfiles/profile
blob: 3885e0adf78d8a9c5bfc17da9348b24bffd38b90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# environment

# ISO8601 date format and 24-hour clock
export LC_TIME=en_DK.UTF-8

## prevent python from crapping all over the filesystem
export PYTHONDONTWRITEBYTECODE=1

export EDITOR=vim
export VISUAL=$EDITOR

export INPUTRC=${HOME}/.config/inputrc

## 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/

## less configuration
### colors
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'

### history
export LESSHISTFILE=${HOME}/.local/var/less/history
export LESSHISTSIZE=65536

## 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

# 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