-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshenv
25 lines (22 loc) · 818 Bytes
/
.zshenv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# vim: filetype=zsh foldmethod=marker
[[ -d "$HOME/.config/environment.d" ]] && {
for FILE in "$HOME/.config/environment.d"/*; do
# read all variables from file and then export them
source "$FILE" && {
VARS=("${(f)$(< <(sed -nE '/^[[:space:]]*#/d; s/^[[:space:]]*([[:alpha:]_][[:alnum:]_]+?)=.+/\1/p' "$FILE"))}")
export "${VARS[@]}"
}
done
}
if [[ "${1:-}" =~ startplasma ]] || [[ "${1:-}" =~ xdm/sys.xsession ]]; then
[[ -r "$HOME/.xprofile" ]] && source "$HOME/.xprofile"
exec "$@"
elif [[ -o LOGIN ]]; then
exec "$SHELL" -l "$@"
else
# opensuse has quite a lot of shit in /etc/zshrc so the only option is to disable global configs if this file exists
if [[ "$IS_NAS" == "1" ]] || [[ -r /etc/zshrc && ! -d "/etc/boo""kings" ]]; then
unsetopt GLOBAL_RCS
fi
: # do nothing, just continue
fi