swayidle: fix option documentation

This commit is contained in:
Robert Helgesson 2022-01-06 09:22:42 +01:00
parent 426ab2cf11
commit 5fb55d51e2
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -27,19 +27,19 @@ in {
options = {
timeout = mkOption {
type = types.ints.positive;
description = "Timeout in seconds";
example = 60;
description = "Timeout in seconds.";
};
command = mkOption {
type = types.str;
description = "Command to run after timeout seconds of inactivity";
description = "Command to run after timeout seconds of inactivity.";
};
resumeCommand = mkOption {
type = with types; nullOr str;
default = null;
description = "Command to run when there is activity again";
description = "Command to run when there is activity again.";
};
};
};
@ -48,18 +48,18 @@ in {
options = {
event = mkOption {
type = types.enum [ "before-sleep" "after-resume" "lock" "unlock" ];
description = "Event name";
description = "Event name.";
};
command = mkOption {
type = types.str;
description = "Command to run when event occurs";
description = "Command to run when event occurs.";
};
};
};
in {
enable = mkEnableOption "Idle manager for Wayland";
enable = mkEnableOption "idle manager for Wayland";
package = mkOption {
type = types.package;
@ -71,30 +71,30 @@ in {
timeouts = mkOption {
type = with types; listOf (submodule timeoutModule);
default = [ ];
description = "List of commands to run after idle timeout";
example = ''
example = literalExpression ''
[
{ timeout = 60; command = "swaylock -fF"; }
]
'';
description = "List of commands to run after idle timeout.";
};
events = mkOption {
type = with types; listOf (submodule eventModule);
default = [ ];
example = ''
example = literalExpression ''
[
{ event = "before-sleep"; command = "swaylock"; }
{ event = "lock"; command = "lock"; }
]
'';
description = "Run command on occurence of a event";
description = "Run command on occurence of a event.";
};
extraArgs = mkOption {
type = with types; listOf str;
default = [ ];
description = "Extra arguments to pass to swayidle";
description = "Extra arguments to pass to swayidle.";
};
};