From 208bb336d6e081316328e4e95f5246ef6238959f Mon Sep 17 00:00:00 2001 From: Tilman Baumann Date: Fri, 22 Dec 2023 15:39:15 +0100 Subject: [PATCH] Add shutdown handler to stop sway-session.target --- Systemd-integration.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Systemd-integration.md b/Systemd-integration.md index a89c0ea..efba3f9 100644 --- a/Systemd-integration.md +++ b/Systemd-integration.md @@ -21,6 +21,7 @@ In order for the unit file to work properly, add the following lines to either ` ```bash 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 ``` This imports all of sway's environment variables into the systemd user manager, allowing its services to access these variables (for example the D-Bus session address), and then starts the sway session user target.