From 4f447cbdfcc794e9f4c23f5f43bae3fa30561831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 19 Dec 2020 17:01:26 +0100 Subject: [PATCH] Export XDG_PICTURES_DIR --- .xdg_set_env.sh | 6 ++++++ .xprofile | 1 + bin/sway | 1 + 3 files changed, 8 insertions(+) create mode 100755 .xdg_set_env.sh diff --git a/.xdg_set_env.sh b/.xdg_set_env.sh new file mode 100755 index 0000000..b1fb69d --- /dev/null +++ b/.xdg_set_env.sh @@ -0,0 +1,6 @@ +XDG_USER_DIR_FILE="$HOME/.config/user-dirs.dirs" + +if [ -f "$XDG_USER_DIR_FILE" ]; then + . "$XDG_USER_DIR_FILE" + export XDG_PICTURES_DIR="$XDG_PICTURES_DIR" +fi diff --git a/.xprofile b/.xprofile index 562e674..cea2ccf 100644 --- a/.xprofile +++ b/.xprofile @@ -2,6 +2,7 @@ [ -f ~/.Xresources ] && xrdb -merge ~/.Xresources [ -f ~/.setpath.sh ] && . ~/.setpath.sh [ -f ~/.set_compose_key.sh ] && . ~/.set_compose_key.sh +[ -f ~/.xdg_set_env.sh ] && . ~/.xdg_set_env.sh hash xcompmgr 2>/dev/null && xcompmgr & hash xscreensaver 2>/dev/null && xscreensaver -no-splash & diff --git a/bin/sway b/bin/sway index 214e949..a3595eb 100755 --- a/bin/sway +++ b/bin/sway @@ -9,5 +9,6 @@ if [ -f "$COMPOSE_KEY_FILE" ]; then COMPOSE_KEY=$(cat "$COMPOSE_KEY_FILE") export XKB_DEFAULT_OPTIONS="compose:$COMPOSE_KEY" fi +[ -f ~/.xdg_set_env.sh ] && . ~/.xdg_set_env.sh /usr/bin/sway $*