reorganization
This commit is contained in:
parent
2ad77494b2
commit
b6afba390b
24 changed files with 144 additions and 128 deletions
|
|
@ -11,7 +11,6 @@ in {
|
|||
default = pkgs.hypridle;
|
||||
example = "pkgs.hypridle";
|
||||
};
|
||||
desktop = mkEnableOption "Extend screen dimming time and disable sleeping";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
|
@ -30,12 +29,12 @@ in {
|
|||
|
||||
listener = [
|
||||
{
|
||||
timeout = if !cfg.desktop
|
||||
timeout = if config.modules.core.laptop
|
||||
then 60 * 2 # 2 min
|
||||
else 60 * 35; # 35 min
|
||||
on-timeout = "${pkgs.systemd}/bin/loginctl lock-session"; # lock computer
|
||||
}
|
||||
] ++ optionals (!cfg.desktop) [
|
||||
] ++ optionals (config.modules.core.laptop) [
|
||||
{
|
||||
timeout = 60; # 1 min
|
||||
on-timeout = "${lib.getExe pkgs.brightnessctl} -c backlight -s set 20"; # dim screen, save brightness state
|
||||
|
|
@ -51,7 +50,7 @@ in {
|
|||
on-timeout = "${pkgs.systemd}/bin/systemctl suspend"; # sleep/suspend
|
||||
}
|
||||
] ++ optional config.modules.desktop.niri.enable {
|
||||
timeout = if !cfg.desktop
|
||||
timeout = if config.modules.core.laptop
|
||||
then 90 # 1.5 min
|
||||
else 30 * 60; # 30 min
|
||||
on-timeout = "niri msg action power-off-monitors";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue