mirror of
https://github.com/swaywm/sway.git
synced 2024-11-24 17:01:29 +00:00
Add shutdown handler to stop sway-session.target
parent
cc37ab7402
commit
208bb336d6
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue