Drop fragile XDG_RUNTIME_DIR support

An XDG runtime directory cannot be provided reliably by the shell,
because it's supposed to have the same lifetime as the user's login
session, and the shell doesn't have a reliable way to keep track of that
lifetime. There are probably nonportable ways to get a conforming
directory, such as making a request to PAM, but PAM is supposed to set
XDG_RUNTIME_DIR itself anyway and also doesn't exist on Macs, which I
use most of the time.

My configuration isn't actually using XDG_RUNTIME_DIR anyway, so I don't
want to provide the misleading impression that a runtime directory with
proper behaviour conforming to the specification is definitely
available.
This commit is contained in:
Danielle McLean 2021-09-22 10:22:09 +10:00
parent 2018821e9f
commit f06071e7c7
Signed by: 00dani
GPG key ID: 9DDE1EDE01E3A605
2 changed files with 1 additions and 14 deletions

View file

@ -1,2 +0,0 @@
#! zsh
(( $SHLVL == 1 && $(w -h $LOGNAME | wc -l) == 1 )) && rm -rf $XDG_RUNTIME_DIR 2>/dev/null