aboutsummaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2016-12-21 18:16:33 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2017-06-01 18:38:10 +0200
commit9ac95fc4bbdb4ff08408f4c4aae12fa09749cb21 (patch)
tree65366bf91147f1f522675ab5a0ef14becf18124d /zsh
parent321615e42048efec6a1d0f7360bbe9c1b43d94d9 (diff)
downloaddotfiles-9ac95fc4bbdb4ff08408f4c4aae12fa09749cb21.tar.xz
Export XDG_RUNTIME_DIR to /run/user/uid if exists and owned by user
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'zsh')
-rw-r--r--zsh/zprofile3
1 files changed, 3 insertions, 0 deletions
diff --git a/zsh/zprofile b/zsh/zprofile
index 88c1ee7..15636fd 100644
--- a/zsh/zprofile
+++ b/zsh/zprofile
@@ -7,6 +7,9 @@ path=( "$HOME"/.local/bin
export XDG_CACHE_HOME="$HOME"/.cache
export XDG_CONFIG_HOME="$HOME"/.config
export XDG_DATA_HOME="$HOME"/.local/share
+if [[ -z "$XDG_RUNTIME_DIR" ]] && [[ -d /run/user/"$UID" ]] && [[ -w /run/user/"$UID" ]]; then
+ export XDG_RUNTIME_DIR=/run/user/"$UID"
+fi
export HISTSIZE=500000
export SAVEHIST=600000