diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 28f7c01..89677af 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -310,3 +310,7 @@ for_window [class="^kitty$" instance="^meta$"] move scratchpad, scratchpad show #exec --no-startup-id nextcloud for_window [shell="xwayland"] title_format "%title [xwayland]" + +exec "systemctl --user import-environment {,WAYLAND_}DISPLAY SWAYSOCK; systemctl --user start sway-session.target" +exec swaymsg -t subscribe '["shutdown"]' && systemctl --user stop sway-session.target + diff --git a/systemd/.config/systemd/user/sway-session.target b/systemd/.config/systemd/user/sway-session.target new file mode 100644 index 0000000..30151b3 --- /dev/null +++ b/systemd/.config/systemd/user/sway-session.target @@ -0,0 +1,6 @@ +[Unit] +Description=sway compositor session +Documentation=man:systemd.special(7) +BindsTo=graphical-session.target +Wants=graphical-session-pre.target +After=graphical-session-pre.target