1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

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:
Filippo Berto 2022-08-24 21:56:45 +02:00 committed by GitHub
parent 1d81e6295c
commit b382b59faf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

2
.github/CODEOWNERS vendored
View file

@ -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

View file

@ -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";

View file

@ -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;