From c6a7d526168a704363e2ec81e313e77dc48789a3 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 1 Mar 2025 19:32:41 +0100 Subject: ... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- xwallpaper/xinit | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'xwallpaper/xinit') diff --git a/xwallpaper/xinit b/xwallpaper/xinit index 9080e46..7648dd2 100644 --- a/xwallpaper/xinit +++ b/xwallpaper/xinit @@ -1,5 +1,19 @@ # -*- shell-script -*- +# Set default background +target="$(readlink -- ~/.config/background)" +if test "${target}" = backgrounds/default || test "${target}" = backgrounds/default-travel || test "${target}" = backgrounds/default-nontravel; then + if where="$(where)" 2>/dev/null; then + if test "${where}" = travelling && test -f ~/.config/backgrounds/default-travel; then + ln -sf -- backgrounds/default-travel ~/.config/background + elif test -f ~/.config/backgrounds/default-nontravel; then + ln -sf -- backgrounds/default-nontravel ~/.config/background + else + ln -sf -- backgrounds/default ~/.config/background + fi + fi +fi + # Set background if test -f ~/.config/background."${SESSION_}"; then xwallpaper --zoom ~/.config/background."${SESSION_}" -- cgit v1.2.3-70-g09d2