2) Place the following file in /usr/etc/swayfx/swayrun
#!/usr/bin/env bash
set -euo pipefail
# Export all variables
set -a
# Call the systemd generator that reads all files in environment.d
source /dev/fd/0 <<EOF
$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)
EOF
set +a
exec sway
3) Place the following file in /usr/share/wayland-sessions/swayfx.desktop
[Desktop Entry]
Name=Custom Sway
Comment=An i3-compatible Wayland compositor with custom environment
Exec=/usr/etc/swayfx/swayrun
Type=Application
DesktopNames=CustomSway
Only then can my display manager (SDDM) start swayfx with the desired environment variables properly set.
I hope that miracle-wm will have a simpler way to do this!
Regardless please make sure to explain it thoroughly in the docs :)
Currently when starting sway I have to resort the following method to set environment variables. Found this information on (Lorenzo Bettini's blog)[https://www.lorenzobettini.it/2024/06/environment-variables-in-sway/]:
1) Place the following file in ~/.config/environment.d/wayland.conf:
2) Place the following file in /usr/etc/swayfx/swayrun
3) Place the following file in /usr/share/wayland-sessions/swayfx.desktop
Only then can my display manager (SDDM) start swayfx with the desired environment variables properly set. I hope that miracle-wm will have a simpler way to do this! Regardless please make sure to explain it thoroughly in the docs :)
Maybe related to #228