aboutsummaryrefslogblamecommitdiffstats
path: root/xwallpaper/xinit
blob: 7648dd262a8699dc3ed8bb10ee27b057578c8435 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

                      













                                                                                                                                                    







                                                            
# -*- 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_}"
elif test -f ~/.config/background; then
	xwallpaper --zoom ~/.config/background
elif test -f /etc/background; then
	xwallpaper --zoom /etc/background
fi