diff options
author | Ryan Kavanagh <rak@rak.ac> | 2024-01-05 15:13:55 -0500 |
---|---|---|
committer | Ryan Kavanagh <rak@rak.ac> | 2024-01-05 15:30:51 -0500 |
commit | 0dc520ec4367e73849b667ab2efde950c87d18bf (patch) | |
tree | ddd533dde5f4c4387d7c66fa4815f11abc75ecdc /dot_config/environment.d | |
parent | rak-meta (diff) |
Improve environment var handling for shells and systemd
Diffstat (limited to '')
-rw-r--r-- | dot_config/environment.d/01_PATH.conf | 3 | ||||
-rw-r--r-- | dot_config/environment.d/02_xdg-base-dirs | 4 | ||||
-rw-r--r-- | dot_config/environment.d/02_xdg-base-dirs.conf | 4 | ||||
-rw-r--r-- | dot_config/environment.d/03_locale.conf.tmpl | 6 | ||||
-rw-r--r-- | dot_config/environment.d/03_locale.tmpl | 10 |
5 files changed, 13 insertions, 14 deletions
diff --git a/dot_config/environment.d/01_PATH.conf b/dot_config/environment.d/01_PATH.conf new file mode 100644 index 0000000..e342e30 --- /dev/null +++ b/dot_config/environment.d/01_PATH.conf @@ -0,0 +1,3 @@ +PATH=${PATH:-/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games} +PATH=${HOME}/.cargo/bin:${PATH} +PATH=${HOME}/bin:${PATH} diff --git a/dot_config/environment.d/02_xdg-base-dirs b/dot_config/environment.d/02_xdg-base-dirs deleted file mode 100644 index 18acb96..0000000 --- a/dot_config/environment.d/02_xdg-base-dirs +++ /dev/null @@ -1,4 +0,0 @@ -export XDG_CACHE_HOME="${HOME}/.cache" -export XDG_CONFIG_HOME="${HOME}/.config" -export XDG_DATA_HOME="${HOME}/.local/share" -export XDG_STATE_HOME="${HOME}/.local/state" diff --git a/dot_config/environment.d/02_xdg-base-dirs.conf b/dot_config/environment.d/02_xdg-base-dirs.conf new file mode 100644 index 0000000..6da8783 --- /dev/null +++ b/dot_config/environment.d/02_xdg-base-dirs.conf @@ -0,0 +1,4 @@ +XDG_CACHE_HOME=${HOME}/.cache +XDG_CONFIG_HOME=${HOME}/.config +XDG_DATA_HOME=${HOME}/.local/share +XDG_STATE_HOME=${HOME}/.local/state diff --git a/dot_config/environment.d/03_locale.conf.tmpl b/dot_config/environment.d/03_locale.conf.tmpl new file mode 100644 index 0000000..86380d3 --- /dev/null +++ b/dot_config/environment.d/03_locale.conf.tmpl @@ -0,0 +1,6 @@ +LANG="{{ .locale_base}}.UTF-8" +LC_TIME="en_GB.UTF-8" +# force strict lexicographic sorting +LC_COLLATE=C + +# vim: set ft=sh: diff --git a/dot_config/environment.d/03_locale.tmpl b/dot_config/environment.d/03_locale.tmpl deleted file mode 100644 index 7d73fb3..0000000 --- a/dot_config/environment.d/03_locale.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -if ! export LANG=$(locale -a | grep -E -i "{{ .locale_base }}\.UTF-?8"); then - if ! export LANG=$(locale -a | grep -E -i "C.UTF-?8"); then - export LANG=C - fi -fi - -export LC_TIME="en_GB.UTF-8" -export LC_COLLATE=C # force strict lexicographic sorting - -# vim: set ft=sh: |