Skip to content

Commit

Permalink
Rename dimDisplay.idleTimeOut to dimDisplay.idleTimeout in powerd…
Browse files Browse the repository at this point in the history
…evil module (#366)

This change was made to maintain consistency with other options
  • Loading branch information
meirisoda authored Sep 21, 2024
1 parent 5a0c70a commit 7fb80fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/powerdevil.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ let
example = false;
description = "Enable or disable screen dimming.";
};
idleTimeOut = lib.mkOption {
idleTimeout = lib.mkOption {
type = with lib.types; nullOr (ints.between 20 600000);
default = null;
example = 300;
Expand Down Expand Up @@ -160,11 +160,11 @@ let
DimDisplayWhenIdle =
if (cfg.powerdevil.${optionsName}.dimDisplay.enable != null) then
cfg.powerdevil.${optionsName}.dimDisplay.enable
else if (cfg.powerdevil.${optionsName}.dimDisplay.idleTimeOut != null) then
else if (cfg.powerdevil.${optionsName}.dimDisplay.idleTimeout != null) then
true
else
null;
DimDisplayIdleTimeoutSec = cfg.powerdevil.${optionsName}.dimDisplay.idleTimeOut;
DimDisplayIdleTimeoutSec = cfg.powerdevil.${optionsName}.dimDisplay.idleTimeout;
};
};
in
Expand All @@ -187,8 +187,8 @@ in
message = "Setting programs.plasma.powerdevil.${type}.turnOffDisplay.idleTimeoutWhenLocked for idleTimeout \"never\" is not supported.";
}
{
assertion = (cfg.powerdevil.${type}.dimDisplay.enable != false || cfg.powerdevil.${type}.dimDisplay.idleTimeOut == null);
message = "Cannot set programs.plasma.powerdevil.${type}.dimDisplay.idleTimeOut when programs.plasma.powerdevil.${type}.dimDisplay.enable is disabled.";
assertion = (cfg.powerdevil.${type}.dimDisplay.enable != false || cfg.powerdevil.${type}.dimDisplay.idleTimeout == null);
message = "Cannot set programs.plasma.powerdevil.${type}.dimDisplay.idleTimeout when programs.plasma.powerdevil.${type}.dimDisplay.enable is disabled.";
}
];
in
Expand Down

0 comments on commit 7fb80fe

Please sign in to comment.