]> git.sev.monster Git - dotfiles.git/blame - base/.zshenv
replace modeline with editorconfig; small fixes
[dotfiles.git] / base / .zshenv
CommitLineData
e69caf64 1[[ -v _sev_home ]] || export _sev_home=$HOME
2
8d4a98e1 3export ZDOTDIR=${XDG_CONFIG_HOME:-~/.config}/zsh
4
833b2af3 5### load site-specific
8d4a98e1 6[[ -f ${ZDOTDIR:-~}/.zshenv.local ]] && source ${ZDOTDIR:-~}/.zshenv.local
79d4a356 7
833b2af3 8### fix broken term
8d4a98e1 9if [[ ! -v TERM ]] {
10 TERM=xterm-256color >/dev/null 2>&1
11}
6d54344e 12if [[ -o interactive && $#terminfo -eq 0 ]] {
13 _oldterm=$TERM
8d4a98e1 14 export TERM=xterm >/dev/null 2>&1
975ad64b 15 print -P "%F{red}!!! Can't find terminfo for $_oldterm, using $TERM%f"
6d54344e 16 unset _oldterm
833b2af3 17}
18
e69caf64 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 == 1 ]] {
29 ### early zprofile sourcing for first shell even if not a login shell
30 source ${ZDOTDIR:-~}/.zprofile
d569f3f7 31}
This page took 0.036813 seconds and 4 git commands to generate.