Sway and Systemd Details
If you got linked to the toplevel of this file, something went wrong. The main post is Sway and systemd. This post is intended as technical details and the “why”. The main post has the motivation and for all of this.
SDDM /etc/sddm.conf.d/autologin.conf is the only config file I have here.
[Autologin] User=ongy Session=sway-systemd.desktop Sway stuff sway.desktop This is the .desktop file that should be used for our sway session. It’s placed into /usr/share/wayland-sessions/sway-systemd.desktop
[Desktop Entry] Name=Sway Service Comment=Start sway via systemd Exec=sway-service.sh Type=Application It needs a secondary shell script, for me it’s at /usr/local/bin/sway-service.sh
#!/bin/sh systemctl --user import-environment exec systemctl --wait --user start sway.