1 export ZDOTDIR=${XDG_CONFIG_HOME:-~/.config}/zsh
4 [[ -f ${ZDOTDIR:-~}/.zshenv.local ]] && source ${ZDOTDIR:-~}/.zshenv.local
8 TERM=xterm-256color >/dev/null 2>&1
10 if [[ -o interactive && $#terminfo -eq 0 ]] {
12 export TERM=xterm >/dev/null 2>&1
13 print -P "%F{red}!!! Can't find terminfo for $_oldterm, using $TERM%f"
18 ### cd on login shell for convenience
19 # NOTE: we do this here and not in .zprofile since we occasionally might
20 # re-source .zprofile, and it's easier to just put the logic here...
23 if [[ ! -v _sev_first_display && ( -v DISPLAY || -v WAYLAND_DISPLAY ) ]] {
24 ### update gpgagent to use graphical pinentry
25 # XXX: will be sourced by every new child shell if zsh is not used to
26 # start the graphical session and the _sev_first_disaply var isn't
27 # exported; for example, this happens with sway without a display
28 # manager or launcher in front of it
29 export _sev_first_display=
30 _sev_refresh_gpgagent= source ${ZDOTDIR:-~}/.zprofile
31 } elif [[ $SHLVL == 1 ]] {
32 ### early zprofile sourcing for first shell even if not a login shell
33 # NOTE: ensure profile is loaded for toplevel shells; should hopefully be 1
34 # under some Xorg or cron implementations, which is where this would be most useful
35 source ${ZDOTDIR:-~}/.zprofile
39 # vim: et sts=4 sw=4 ts=8 tw=79