From 95bd5767ae4c4e26e3ba33f9844cc916530d7b89 Mon Sep 17 00:00:00 2001 From: Basti Date: Sun, 20 Jun 2021 23:15:43 +0200 Subject: [PATCH] Use XDG_* variables for directories and /home/sebtm* only as fallback (ported from #184) (#244) --- betterlockscreen | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/betterlockscreen b/betterlockscreen index 55259a9..edf2cfd 100755 --- a/betterlockscreen +++ b/betterlockscreen @@ -44,14 +44,14 @@ init_config () { dunst_paused_state="$(dunstctl is-paused)" # read user config - USER_CONF="$HOME/.config/betterlockscreenrc" + USER_CONF="${XDG_CONFIG_HOME:-$HOME/.config}/betterlockscreenrc" if [ -e "$USER_CONF" ]; then # shellcheck source=/dev/null source "$USER_CONF" fi # paths - CACHE_DIR="$HOME/.cache/i3lock" + CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/betterlockscreen" CUR_DIR="$CACHE_DIR/current" # wallpaper