From 3fcf651cfeaf7e260d302b61b973e1563f73ba10 Mon Sep 17 00:00:00 2001 From: sev Date: Mon, 16 Oct 2023 19:19:53 -0500 Subject: [PATCH] .zprofile: small changes --- etc/zsh/.zprofile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/zsh/.zprofile b/etc/zsh/.zprofile index 05544ed..57c9ffc 100644 --- a/etc/zsh/.zprofile +++ b/etc/zsh/.zprofile @@ -144,7 +144,7 @@ if [[ ! -v _sev_setup_xdg ]] { mkdir -m760 ~/.local/share } xdg_data_dirs=($XDG_DATA_HOME /{opt,usr/local,usr/pkg,usr}/share - "${XDG_DATA_DIRS:+${xdg_data_dirs[@]}}") + ${XDG_DATA_DIRS:+"$xdg_data_dirs[@]"}) # XXX: if colons are not escaped, could remove unintended part of string # TODO: remove empty element via array not scalar export XDG_DATA_DIRS=${XDG_DATA_DIRS#$XDG_DATA_HOME:} @@ -181,6 +181,10 @@ if [[ ! -v _sev_setup_xdg ]] { } if [[ -v XDG_RUNTIME_DIR ]] { + # NOTE: this can be set by systemd or other pre-shell supervisor, and + # if any services were started such as pipewire, we need to use + # the existing runtime dir so that we can get any existing + # program sockets or other data export XDG_RUNTIME_DIR } elif [[ -v TMPDIR ]] { # make runtime dir in our session-specific tmpdir -- 2.47.0