30 lines
1,017 B
Bash
Executable file
30 lines
1,017 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
## General exports
|
|
export XDG_CURRENT_DESKTOP=mir:miracle-wm
|
|
export XDG_SESSION_DESKTOP=mir:miracle-wm
|
|
export XDG_SESSION_TYPE=wayland
|
|
|
|
## Load system and user environment.d variables using systemd generator
|
|
if [ -x /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]; then
|
|
set -a
|
|
# Source the generator output in a subshell to avoid pollution
|
|
. /dev/fd/0 <<EOF
|
|
$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)
|
|
EOF
|
|
set +a
|
|
fi
|
|
|
|
## Legacy fallback (optional)
|
|
if [ ! -x /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ] && \
|
|
[ -d /etc/environment.d ]; then
|
|
set -a
|
|
for f in /etc/environment.d/*.conf; do
|
|
[ -f "$f" ] && . "$f"
|
|
done
|
|
set +a
|
|
fi
|
|
|
|
exec systemd-cat --identifier=miracle-wm /usr/bin/miracle-wm \
|
|
--systemd-session-configure=/usr/libexec/miracle-wm-session-setup \
|
|
--display-config=static=$(systemd-path user-configuration)/miracle-wm-display.yaml
|