]> git.sev.monster Git - dotfiles.git/blob - base/.zprofile
refactored zsh configs, commented gpg-agent.conf
[dotfiles.git] / base / .zprofile
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
21
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
31     if [[ ! -v SSH_AUTH_SOCK ]] {
32         export GPG_TTY=$(tty)
33         gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
34         export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
35     }
36 }
37 ## xdg
38 export XDG_CONFIG_HOME=~/etc
39 export XDG_CONFIG_DIRS=~/.config:/usr/pkg/etc/xdg:/usr/local/etc/xdg:/etc/xdg
40 export XDG_DATA_HOME=~/share
41 export XDG_DATA_DIRS=~/.local/share:/usr/pkg/share:/usr/local/share:/usr/share
42 export XDG_CACHE_HOME=~/tmp
43 export XDG_RUNTIME_DIR=~/tmp
44 ## grep
45 # XXX: deprecated in GNU
46 export GREP_OPTIONS=--color=auto
47
48 ### tmp
49 t="${TMPDIR:-/tmp}/home-$LOGNAME"
50 h="$HOME/tmp"
51 if [[ ! -e "$t" ]] {
52     mkdir -m 700 "$t" > /dev/null 2>&1
53     #TODO: check if dir exists after mkdir
54 }
55 #allow opaque entries to override link creation
56 if [[ ! -e "$h" ]] {
57     ln -sf "$t" "$h" > /dev/null 2>&1
58 }
59 unset t
60 unset h
61
62 ### load site-specific
63 if [[ -f ~/.zprofile.local ]] { source ~/.zprofile.local }
64
65 # vim: set et sts=4 sw=4 ts=8 tw=79 :
This page took 0.045914 seconds and 4 git commands to generate.