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
3 changed files with 12 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue