1
0
Fork 0
dotfiles/.config/X11/xinitrc
2024-02-02 17:10:53 +01:00

30 lines
594 B
Bash
Executable file

#!/bin/sh
# shellcheck disable=SC2016
exec dbus-run-session -- sh -c '
X11_CONFIG="$XDG_CONFIG_HOME/X11"
SESSIONFILES=$(run-parts --list "$X11_CONFIG/xsession.d")
if [ -n "$SESSIONFILES" ]; then
set +e
for SESSIONFILE in $SESSIONFILES; do
echo "Executing $SESSIONFILE"
$SESSIONFILE
done
set -e
fi
echo "Sourcing $X11_CONFIG/xprofile"
. "$X11_CONFIG/xprofile"
echo $DBUS_SESSION_BUS_ADDRESS > $XDG_STATE_HOME/dbus_session_bus_address
echo "Starting DWM with PATH='$PATH:$HOME'"
dwm
echo "Exited DWM, Killing $(jobs -p | awk "{print \$3}")"
kill $(jobs -p | awk "{print \$3}")
'