Sway: Difference between revisions
imported>Artturin add pathsToLink |
imported>Spwhitt Document how to create systemd service for swayidle |
||
Line 267: | Line 267: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Note: swayidle will fail cryptically if it cannot find {{ic|sh}} in {{ic|PATH}}, so you must provide this if you create a service file for it. An example is below: | |||
<syntaxhighlight lang="nix"> | |||
systemd.user.services.swayidle = { | |||
description = "Idle Manager for Wayland"; | |||
documentation = [ "man:swayidle(1)" ]; | |||
wantedBy = [ "sway-session.target" ]; | |||
partOf = [ "graphical-session.target" ]; | |||
path = [ pkgs.bash ]; | |||
serviceConfig = { | |||
ExecStart = '' ${pkgs.swayidle}/bin/swayidle -w -d \ | |||
timeout 300 '${pkgs.sway}/bin/swaymsg "output * dpms off"' \ | |||
resume '${pkgs.sway}/bin/swaymsg "output * dpms on"' | |||
''; | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
[[Category:Window managers]] | [[Category:Window managers]] |