systemd setup for kanshi

This commit is contained in:
Thies Lennart Alff 2024-03-27 12:13:09 +01:00
parent 7a0b44cb74
commit d9704edfe8
4 changed files with 23 additions and 3 deletions

View file

@ -9,9 +9,6 @@ include ~/.config/sway/config.d/*
# output eDP-1 scale 1.5 # output eDP-1 scale 1.5
# output * scale 1.25 # output * scale 1.25
# enable automatic display arrangements
exec kanshi
# notification daemon # notification daemon
exec mako exec mako
@ -149,3 +146,9 @@ client.focused_inactive #000000 #000000 #c6d0f5 #ea999c #232634
client.unfocused #000000 #000000 #c6d0f5 #ea999c #232634 client.unfocused #000000 #000000 #c6d0f5 #ea999c #232634
floating_modifier $mod floating_modifier $mod
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
# enable automatic display arrangements
exec_always "systemctl --user restart kanshi.service"

View file

@ -0,0 +1,10 @@
[Unit]
Description=Start kanshi display service
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/kanshi
[Install]
WantedBy=sway-session.target

View 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

View file

@ -0,0 +1 @@
/home/lennartalff/.config/systemd/user/kanshi.service