1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-30 06:59:45 +01:00

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