]> git.sev.monster Git - dotfiles.git/blame_incremental - base/.zshenv
small fixes
[dotfiles.git] / base / .zshenv
... / ...
CommitLineData
1[[ -v _sev_home ]] || export _sev_home=$HOME
2
3export ZDOTDIR=${XDG_CONFIG_HOME:-~/.config}/zsh
4
5### load site-specific
6[[ -f ${ZDOTDIR:-~}/.zshenv.local ]] && source ${ZDOTDIR:-~}/.zshenv.local
7
8### fix broken term
9if [[ ! -v TERM ]] {
10 TERM=xterm-256color >/dev/null 2>&1
11}
12if [[ -o interactive && $#terminfo -eq 0 ]] {
13 _oldterm=$TERM
14 export TERM=xterm >/dev/null 2>&1
15 print -P "%F{red}!!! Can't find terminfo for $_oldterm, using $TERM%f"
16 unset _oldterm
17}
18
19# NOTE: see .zprofile comment for rationale on sourcing
20if [[ ! -v _sev_first_display && ( -v DISPLAY || -v WAYLAND_DISPLAY ) ]] {
21 ### update gpgagent to use graphical pinentry
22 # XXX: will be sourced by every new child shell if zsh is not used to
23 # start the graphical session and the _sev_first_display var isn't
24 # exported; for example, this previously happened with sway without a
25 # display manager or launcher in front of it
26 export _sev_first_display=
27 _sev_refresh_gpgagent= source ${ZDOTDIR:-~}/.zprofile
28} elif [[ ! -o login && $SHLVL -eq 1 && ${+TERMUX_VERSION} -eq 0 ]] {
29 ### early zprofile sourcing for first shell even if not a login shell
30 source ${ZDOTDIR:-~}/.zprofile
31}
This page took 0.028958 seconds and 4 git commands to generate.