aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-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_}"