dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit d3b56adcd93284fbeff97d95eb7eece4793b07bd
parent 9eaf2ae68bca10da87f705241ab6d75c0af2ff02
Author: Chris Bracken <chris@bracken.jp>
Date:   Mon,  9 Oct 2023 09:51:10 -0700

Move XDG settings to top of zshenv

This allows for their use in other parts of the file.

Diffstat:
M.zshenv | 25+++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/.zshenv b/.zshenv @@ -3,6 +3,18 @@ # Default read-only permissions for group/other. umask 022 +# If not running under a FreeDesktop session manager, set XDG_CONFIG_HOME. +if [[ -z "$XDG_CONFIG_HOME" ]]; then + export XDG_CONFIG_HOME="$HOME/.config" +fi + +# If not running under a FreeDesktop session manager, set XDG_RUNTIME_DIR. +if [[ -z "$XDG_RUNTIME_DIR" ]]; then + export XDG_RUNTIME_DIR="/tmp/user/$(id -u)" + mkdir -p "$XDG_RUNTIME_DIR" + chmod 0700 "$XDG_RUNTIME_DIR" +fi + # Basics export EDITOR=vim export PAGER=less @@ -25,7 +37,7 @@ export GNUPGHOME="$HOME/.gnupg" export GPG_TTY="$(tty)" # Notmuch email indexer. -export NOTMUCH_CONFIG="$HOME/.config/notmuch/config" +export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config" # Google stuff. export P4CONFIG=.p4config @@ -53,14 +65,3 @@ fi if [[ -d "$HOME/.perl5/lib/perl5" ]]; then export PERL5LIB="$HOME/.perl5/lib/perl5:$PERL5LIB" fi - -# When not running under a FreeDesktop-compliant session manager, set XDG -# variables for programs (e.g. git, sway) that use them. -if [[ -z "$XDG_CONFIG_HOME" ]]; then - export XDG_CONFIG_HOME="$HOME/.config" -fi -if [[ -z "$XDG_RUNTIME_DIR" ]]; then - export XDG_RUNTIME_DIR="/tmp/user/$(id -u)" - mkdir -p "$XDG_RUNTIME_DIR" - chmod 0700 "$XDG_RUNTIME_DIR" -fi