summaryrefslogtreecommitdiff
path: root/.config/X11/clientrc
blob: bc68ed65b77b75c1d4d87391f98f6abe40082ca4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/hint/sh

# Load system xinit modules (disabled)
# Remove "false &&" to enable
if false && [ -d /etc/X11/xinit/xinitrc.d ]; then
	echo ' ==> Running scripts in Entering xinitrc.d/*'
	for f in /etc/X11/xinit/xinitrc.d/*; do
		echo "  -> $f"
		[ -x "$f" ] && . "$f"
	done
	unset f
	echo '  -> done'
fi

usermodmap="$XDG_CONFIG_HOME/X11/modmap"
if [ -f "$usermodmap" ]; then
	xmodmap "$usermodmap"
fi

if [ -z "$XDG_RUNTIME_DIR" ]; then
	printf "XDG_RUNTIME_DIR isn't set\n" >&2
	exit 6
fi
_DISPLAY="$(systemd-escape -- "$DISPLAY")"
trap "rm -f $(printf '%q' "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}")" EXIT
mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}"

cat "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}" &
systemctl --user start "wm@${_DISPLAY}.target" &
wait