aboutsummaryrefslogtreecommitdiffstats
path: root/xwallpaper/xinit
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-03-01 19:32:41 +0100
committerMattias Andrée <m@maandree.se>2025-03-01 19:32:41 +0100
commitc6a7d526168a704363e2ec81e313e77dc48789a3 (patch)
tree3588c2e6bfa220096c59e319584f731ecea83a8f /xwallpaper/xinit
parent... (diff)
downloaddotfiles-c6a7d526168a704363e2ec81e313e77dc48789a3.tar.gz
dotfiles-c6a7d526168a704363e2ec81e313e77dc48789a3.tar.bz2
dotfiles-c6a7d526168a704363e2ec81e313e77dc48789a3.tar.xz
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'xwallpaper/xinit')
-rw-r--r--xwallpaper/xinit14
1 files changed, 14 insertions, 0 deletions
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_}"