]>
Commit | Line | Data |
---|---|---|
8eb81f95 | 1 | ### general exports |
2 | export EDITOR=vim | |
3 | export PAGER=less | |
4 | ## lang | |
5 | export CHARSET=UTF-8 | |
6 | export LANG="en_US.UTF-8" | |
7 | export LC_CTYPE="$LANG" | |
8 | ## histfile | |
9 | export HISTFILE=~/.histfile | |
10 | export HISTSIZE=1000 | |
11 | export SAVEHIST=1000 | |
12 | ## path | |
13 | # /usr/{pkg,local,games} are unix/bsdisms | |
14 | typeset -U PATH path | |
15 | path=({~/,/,/usr/}sbin {~/,/,/usr/}bin /usr/pkg/{s,}bin /usr/X11R{7,6}/bin | |
16 | /usr/local/{s,}bin /usr/games "${path[@]}") | |
17 | export PATH | |
18 | typeset -U FPATH fpath | |
19 | fpath=(~/.zsh/functions/Prompts "${fpath[@]}") | |
20 | export FPATH | |
dcac60d9 | 21 | |
8eb81f95 | 22 | ### applications |
23 | ## python | |
24 | export PYTHONSTARTUP=~/.pythonrc | |
25 | ## perl | |
26 | (( ${+commands[perl]} )) && eval $(perl -I $XDG_DATA_HOME/perl5/lib/perl5 -Mlocal::lib=$XDG_DATA_HOME/perl5 2>/dev/null) | |
27 | ## gpg | |
28 | if (( ${+commands[gpg]} )) { | |
29 | # SSH_AUTH_SOCK should be set in a remote SSH session for passthrough | |
30 | # if it isn't, we are likely the first login shell on the local machine | |
8650c486 | 31 | # we also want to update USE_TTY if we are the login shell in graphics mode |
32 | if [[ ! -v SSH_AUTH_SOCK || -v DISPLAY ]] { | |
8eb81f95 | 33 | export GPG_TTY=$(tty) |
8650c486 | 34 | export PINENTRY_USER_DATA=USE_TTY=$((! ${+DISPLAY})) |
8eb81f95 | 35 | gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null |
36 | export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) | |
37 | } | |
38 | } | |
39 | ## xdg | |
40 | export XDG_CONFIG_HOME=~/etc | |
41 | export XDG_CONFIG_DIRS=~/.config:/usr/pkg/etc/xdg:/usr/local/etc/xdg:/etc/xdg | |
42 | export XDG_DATA_HOME=~/share | |
43 | export XDG_DATA_DIRS=~/.local/share:/usr/pkg/share:/usr/local/share:/usr/share | |
44 | export XDG_CACHE_HOME=~/tmp | |
45 | export XDG_RUNTIME_DIR=~/tmp | |
46 | ## grep | |
47 | # XXX: deprecated in GNU | |
48 | export GREP_OPTIONS=--color=auto | |
49 | ||
50 | ### tmp | |
71722092 | 51 | t="${TMPDIR:-/tmp}/home-$LOGNAME" |
dcac60d9 | 52 | h="$HOME/tmp" |
53 | if [[ ! -e "$t" ]] { | |
8eb81f95 | 54 | mkdir -m 700 "$t" > /dev/null 2>&1 |
55 | #TODO: check if dir exists after mkdir | |
dcac60d9 | 56 | } |
8eb81f95 | 57 | #allow opaque entries to override link creation |
dcac60d9 | 58 | if [[ ! -e "$h" ]] { |
8eb81f95 | 59 | ln -sf "$t" "$h" > /dev/null 2>&1 |
dcac60d9 | 60 | } |
186423fe | 61 | unset t |
62 | unset h | |
8eb81f95 | 63 | |
64 | ### load site-specific | |
65 | if [[ -f ~/.zprofile.local ]] { source ~/.zprofile.local } | |
66 | ||
67 | # vim: set et sts=4 sw=4 ts=8 tw=79 : |