]> git.sev.monster Git - dotfiles.git/blame_incremental - base/.zprofile
actually set PINENTRY_USER_DATA, fix invocation
[dotfiles.git] / base / .zprofile
... / ...
CommitLineData
1### general exports
2export EDITOR=vim
3export PAGER=less
4## lang
5export CHARSET=UTF-8
6export LANG="en_US.UTF-8"
7export LC_CTYPE="$LANG"
8## histfile
9export HISTFILE=~/.histfile
10export HISTSIZE=1000
11export SAVEHIST=1000
12## path
13# /usr/{pkg,local,games} are unix/bsdisms
14typeset -U PATH path
15path=({~/,/,/usr/}sbin {~/,/,/usr/}bin /usr/pkg/{s,}bin /usr/X11R{7,6}/bin
16 /usr/local/{s,}bin /usr/games "${path[@]}")
17export PATH
18typeset -U FPATH fpath
19fpath=(~/.zsh/functions/Prompts "${fpath[@]}")
20export FPATH
21
22### applications
23## python
24export 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
28if (( ${+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 # we also want to update USE_TTY if we are the login shell in graphics mode
32 if [[ ! -v SSH_AUTH_SOCK || -v DISPLAY ]] {
33 export GPG_TTY=$(tty)
34 export PINENTRY_USER_DATA=USE_TTY=$((! ${+DISPLAY}))
35 gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
36 export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
37 }
38}
39## xdg
40export XDG_CONFIG_HOME=~/etc
41export XDG_CONFIG_DIRS=~/.config:/usr/pkg/etc/xdg:/usr/local/etc/xdg:/etc/xdg
42export XDG_DATA_HOME=~/share
43export XDG_DATA_DIRS=~/.local/share:/usr/pkg/share:/usr/local/share:/usr/share
44export XDG_CACHE_HOME=~/tmp
45export XDG_RUNTIME_DIR=~/tmp
46## grep
47# XXX: deprecated in GNU
48export GREP_OPTIONS=--color=auto
49
50### tmp
51t="${TMPDIR:-/tmp}/home-$LOGNAME"
52h="$HOME/tmp"
53if [[ ! -e "$t" ]] {
54 mkdir -m 700 "$t" > /dev/null 2>&1
55 #TODO: check if dir exists after mkdir
56}
57#allow opaque entries to override link creation
58if [[ ! -e "$h" ]] {
59 ln -sf "$t" "$h" > /dev/null 2>&1
60}
61unset t
62unset h
63
64### load site-specific
65if [[ -f ~/.zprofile.local ]] { source ~/.zprofile.local }
66
67# vim: set et sts=4 sw=4 ts=8 tw=79 :
This page took 0.037067 seconds and 4 git commands to generate.