Swayidle: Difference between revisions
m link to swayidle and category wayland |
m Added install through config/sway |
||
| Line 3: | Line 3: | ||
== Installation == | == Installation == | ||
=== Standalone === | |||
{{File|3=environment.systemPackages = with pkgs; [ | |||
swayidle | |||
];|name=/etc/nixos/configuration.nix|lang=nix}} | |||
{{ | === Home Manager - Standalone === | ||
{{File|3=services.swayidle.enable = true;|name=/etc/nixos/home.nix|lang=nix}} | |||
}} | |||
=== Home Manager - Through Sway === | |||
{{File|3=programs.sway.extraPackages = with pkgs; [swayidle];|name=/etc/nixos/home.nix|lang=nix}} | |||
== Configuration == | == Configuration == | ||
| Line 18: | Line 23: | ||
# Suspend the system | # Suspend the system | ||
which could be set using {{ic|services.swayidle.timeouts}}. {{ic|services.swayidle.events}} is useful to make the behavior consistent with the above in case {{ic|systemctl suspend}}, {{ic|loginctl lock-session}} are manually run. | which could be set using {{ic|services.swayidle.timeouts}}. {{ic|services.swayidle.events}} is useful to make the behavior consistent with the above in case {{ic|systemctl suspend}}, {{ic|loginctl lock-session}} are manually run. | ||
Additional options may be found within the Home Manager Appendix under [https://nix-community.github.io/home-manager/options.xhtml#opt-services.swayidle.enable services.swayidle]. | |||
{{file|~/.config/home-manager/home.nix|nix|3= | {{file|~/.config/home-manager/home.nix|nix|3= | ||