feat(sway): add sway systemd trigger
This commit is contained in:
parent
43daa9a5e6
commit
5055fefcf8
4 changed files with 23 additions and 0 deletions
2
ansible/templates/sway_systemd_trigger_target
Normal file
2
ansible/templates/sway_systemd_trigger_target
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
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
|
||||
6
ansible/templates/systemd/targets/sway-session.target
Normal file
6
ansible/templates/systemd/targets/sway-session.target
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue