reorganization

This commit is contained in:
Reid 2026-04-22 23:21:23 -07:00
parent 2ad77494b2
commit b6afba390b
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
24 changed files with 144 additions and 128 deletions

View file

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