]> git.sev.monster Git - dotfiles.git/blame - base/.zshenv
fix gpg forward GNUPGHOME reset in cleanup
[dotfiles.git] / base / .zshenv
CommitLineData
833b2af3 1### load site-specific
79d4a356 2[[ -f ~/.zshenv.local ]] && source ~/.zshenv.local
3
833b2af3 4### fix broken term
6d54344e 5if [[ -o interactive && $#terminfo -eq 0 ]] {
6 _oldterm=$TERM
7 TERM=xterm-256color >/dev/null 2>&1
975ad64b 8 print -P "%F{red}!!! Can't find terminfo for $_oldterm, using $TERM%f"
6d54344e 9 unset _oldterm
833b2af3 10}
11
6d54344e 12if [[ -o login ]] {
13 ### cd on login shell for convenience
14 cd ~
15} else {
16 if [[ ! -v _sev_first_display && ( -v DISPLAY || -v WAYLAND_DISPLAY ) ]] {
17 # this is to allow gpg and pinentry env to be updated
18 # XXX: will be sourced by every new child shell if zsh is not used to
19 # start the graphical session, but since .zprofile is light that
20 # shouldn't cause a noticeable performance impact
21 # NOTE: above happens with sway without a display manager or launcher
22 export _sev_first_display=
23 source ${ZDOTDIR:-~}/.zprofile
24 export _sev_first_display=0
79d4a356 25 } elif [[ $SHLVL == 1 ]] {
6d54344e 26 ### early zprofile sourcing for first shell
27 # NOTE: ensure profile is loaded for toplevel shells; should hopefully be 1
28 # under some Xorg or cron implementations, which is where this would be most useful
79d4a356 29 source ${ZDOTDIR:-~}/.zprofile
c3608beb 30 }
d569f3f7 31}
32
79d4a356 33# vim: et sts=4 sw=4 ts=8 tw=79
This page took 0.03889 seconds and 4 git commands to generate.