service.xidlehook: add detect-sleep option (#3165)
Add detect sleep configuration option. Allows to execute the specified commands with more accurate timings if the system wakes from a sleep state.
This commit is contained in:
parent
1d81e6295c
commit
b382b59faf
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -490,7 +490,7 @@ Makefile @thiagokokada
|
|||
|
||||
/modules/services/xembed-sni-proxy.nix @rycee
|
||||
|
||||
/modules/services/xidlehook.nix @dschrempf
|
||||
/modules/services/xidlehook.nix @dschrempf @bertof
|
||||
|
||||
/modules/services/xscreensaver.nix @rycee
|
||||
|
||||
|
|
|
@ -25,6 +25,12 @@
|
|||
github = "blmhemu";
|
||||
githubId = 19410501;
|
||||
};
|
||||
bertof = {
|
||||
name = "bertof";
|
||||
email = "berto.f@protonmail.com";
|
||||
github = "bertof";
|
||||
githubId = 9915675;
|
||||
};
|
||||
CarlosLoboxyz = {
|
||||
name = "Carlos Lobo";
|
||||
email = "86011416+CarlosLoboxyz@users.noreply.github.com";
|
||||
|
|
|
@ -23,13 +23,14 @@ let
|
|||
${concatStringsSep " " (notEmpty [
|
||||
"${cfg.package}/bin/xidlehook"
|
||||
(optionalString cfg.once "--once")
|
||||
(optionalString cfg.detect-sleep "--detect-sleep")
|
||||
(optionalString cfg.not-when-fullscreen "--not-when-fullscreen")
|
||||
(optionalString cfg.not-when-audio "--not-when-audio")
|
||||
timers
|
||||
])}
|
||||
'';
|
||||
in {
|
||||
meta.maintainers = [ maintainers.dschrempf ];
|
||||
meta.maintainers = [ maintainers.dschrempf hm.maintainers.bertof ];
|
||||
|
||||
options.services.xidlehook = {
|
||||
enable = mkEnableOption "xidlehook systemd service";
|
||||
|
@ -55,6 +56,9 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
detect-sleep = mkEnableOption
|
||||
"detecting when the system wakes up from a suspended state and resetting the idle timer";
|
||||
|
||||
not-when-fullscreen = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
|
Loading…
Reference in a new issue