diff options
Diffstat (limited to 'profile')
-rw-r--r-- | profile | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/profile b/profile new file mode 100644 index 0000000..3625f86 --- /dev/null +++ b/profile | |||
@@ -0,0 +1,62 @@ | |||
1 | # ~/.profile -*- sh -*- | ||
2 | |||
3 | . /etc/profile | ||
4 | |||
5 | # History | ||
6 | mkdir -p ~/.history | ||
7 | export HISTFILE=~/.history/sh | ||
8 | export HISTSIZE=1000000000000 | ||
9 | |||
10 | # Environment variables | ||
11 | export ENV="$HOME/.shrc" | ||
12 | export PATH="$HOME/bin:$PATH" | ||
13 | export LC_ALL=en_US.UTF-8 | ||
14 | export CDPATH=:~ | ||
15 | export SUDO=/usr/bin/doas | ||
16 | export EXINIT='set ai ic sm ts=8' | ||
17 | export MISC="$HOME/.misc" | ||
18 | export EDITOR="$(which ed)" | ||
19 | export VISUAL="$(which vi)" | ||
20 | |||
21 | export XDG_CONFIG_HOME="$HOME/.config" | ||
22 | export XDG_CACHE_HOME="$HOME/.cache" | ||
23 | export XDG_DATA_HOME="$HOME/.local/share" | ||
24 | export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" | ||
25 | export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}" | ||
26 | |||
27 | export XDG_DESKTOP_DIR="$HOME/" | ||
28 | export XDG_DOCUMENTS_DIR="$HOME/doc" | ||
29 | export XDG_DOWNLOAD_DIR="$HOME/tmp" | ||
30 | export XDG_MUSIC_DIR="$HOME/music" | ||
31 | export XDG_PICTURES_DIR="$HOME/img" | ||
32 | export XDG_PUBLICSHARE_DIR="$HOME/.local/share/public" | ||
33 | export XDG_TEMPLATES_DIR="$HOME/.local/templates" | ||
34 | export XDG_VIDEOS_DIR="$HOME/video" | ||
35 | |||
36 | if test -z "$XDG_RUNTIME_DIR" | ||
37 | then export XDG_RUNTIME_DIR=/tmp/$(id -u)-runtime-dir | ||
38 | fi | ||
39 | if ! test -d "$XDG_RUNTIME_DIR" | ||
40 | then | ||
41 | mkdir "$XDG_RUNTIME_DIR" | ||
42 | chmod 0700 "$XDG_RUNTIME_DIR" | ||
43 | fi | ||
44 | |||
45 | installedp() { which "$1" >/dev/null 2>&1; } | ||
46 | |||
47 | # SSH | ||
48 | if installedp keychain | ||
49 | then eval $(keychain --quiet --eval --dir "$XDG_RUNTIME_DIR/" --agents ssh) | ||
50 | elif installedp ssh-agent | ||
51 | then eval $(ssh-agent -s) | ||
52 | fi | ||
53 | |||
54 | # RLWRAP | ||
55 | if installedp rlwrap | ||
56 | then export RLWRAP_HOME=$XDG_DATA_HOME/rlwrap | ||
57 | fi | ||
58 | |||
59 | # Start X on login | ||
60 | # if test /dev/tty1 = "$(tty)" && test -z "$DISPLAY" | ||
61 | # then startx | ||
62 | # fi | ||