Jump to content

Sway: Difference between revisions

700 bytes added ,  28 September 2022
added a small section about systemd services
imported>Tom-on-the-internet
m (Add closing curly brace (which I believe is required))
imported>Danielbarter
(added a small section about systemd services)
Line 139: Line 139:
}}
}}


=== Systemd services ===
As explained above, we don't run sway itself as a systemd service. There are auxiliary daemons that we do want to run as systemd services, for example Kanshi [https://sr.ht/~emersion/kanshi/], which implements monitor hot swapping. It would be enabled as follows:
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
  # kanshi systemd service
  systemd.user.services.kanshi = {
    description = "kanshi daemon";
    serviceConfig = {
      Type = "simple";
      ExecStart = ''${pkgs.kanshi}/bin/kanshi -c kanshi_config_file';
    };
  };
</nowiki>}}


{{file|sway config|bash|
exec systemctl --user start kanshi.service
}}
When you launch sway, the systemd service is started.


[[Category:Window managers]]
[[Category:Window managers]]
Anonymous user