From 0d3b4cefb55ca8f1633c98f5009efbb5a8c3565c Mon Sep 17 00:00:00 2001 From: inference Date: Sat, 19 Nov 2022 17:11:11 +0000 Subject: [PATCH] Add XDG_RUNTIME_DIR for seatd support. --- zsh/.zshrc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index c3d1c85..150d350 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -3,7 +3,7 @@ # Copyright 2022 Inference # License: BSD 3-Clause Clear -# 0.0.0.1 +# 0.2.0.3 # Prompt. @@ -28,6 +28,15 @@ HISTFILE=~/.zsh-history HISTSIZE=1024 SAVEHIST=1024 +# XDG_RUNTIME_DIR. +if test -z "${XDG_RUNTIME_DIR}"; then + export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir + if ! test -d "${XDG_RUNTIME_DIR}"; then + mkdir "${XDG_RUNTIME_DIR}" + chmod 0700 "${XDG_RUNTIME_DIR}" + fi +fi + # Aliases. if [[ -f ~/.zsh-aliases ]]; then . ~/.zsh-aliases