summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/login.d/01_xdg.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/.config/login.d/01_xdg.sh b/.config/login.d/01_xdg.sh
index 4464764..c9f789c 100644
--- a/.config/login.d/01_xdg.sh
+++ b/.config/login.d/01_xdg.sh
@@ -9,6 +9,10 @@
[ -n "$XDG_DATA_DIRS" ] || export XDG_DATA_DIRS="/usr/local/share/:/usr/share/"
[ -n "$XDG_CONFIG_DIRS" ] || export XDG_CONFIG_DIRS="/etc/xdg"
[ -n "$XDG_CACHE_HOME" ] || export XDG_CACHE_HOME="$HOME/.cache"
+[ -n "$XDG_VTNR" ] || export XDG_VTNR="$(tty 2>/dev/null | sed -n 's,^/dev/tty,,p')"
+
+# Check if XDG_VTNR got set to empty
+[ -n "$XDG_VTNR" ] || unset XDG_VTNR
# Check if XDG_RUNTIME_DIR is set, but has a bogus setting
if [ -n "$XDG_RUNTIME_DIR" ] && [ ! -d "$XDG_RUNTIME_DIR" ]; then