From 52c52d9217686668d95261e001ad7a96e652025b Mon Sep 17 00:00:00 2001 From: Tobias Schmidl <5060861-schtobia@users.noreply.gitlab.com> Date: Thu, 19 Jan 2023 10:27:28 +0100 Subject: [PATCH] [zshrc] moved all environment variables from zsh to $XDG_CONFIG_DIR/environment.d --- .config/environment.d/lang.conf | 4 ++++ .zshrc | 13 ++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 .config/environment.d/lang.conf diff --git a/.config/environment.d/lang.conf b/.config/environment.d/lang.conf new file mode 100644 index 0000000..eebd2fb --- /dev/null +++ b/.config/environment.d/lang.conf @@ -0,0 +1,4 @@ +LANG=de_DE.UTF-8 +PAPERSIZE=a4 +LANGUAGE=de:en +L_ALL=de_DE.UTF-8 diff --git a/.zshrc b/.zshrc index c6e6bca..80b6bdb 100644 --- a/.zshrc +++ b/.zshrc @@ -1,10 +1,9 @@ -# explicitly set the language, *before* antigen gets loaded -export LANG=de_DE.UTF-8 -export PAPERSIZE=a4 -export LANGUAGE=de:en - -# export ANTIGEN_LOG=$HOME/antigen.log -# export ANTIGEN_DEBUG_LOG=$HOME/antigen.debug.log +if [ -d /usr/lib/systemd/system-environment-generators ]; +then + run-parts /usr/lib/systemd/user-environment-generators | grep -v '#' | grep -v '^ $' | while read cur_env; do export ${cur_env}; done +else + cat $HOME/.config/environment.d/* | grep -v '#' | grep -v '^$' | while read cur_env; do export "${cur_env}"; done +fi setopt HIST_EXPIRE_DUPS_FIRST setopt HIST_IGNORE_DUPS