disbale hypridle autosuspend on desktop

This commit is contained in:
2025-02-26 16:52:55 +01:00
parent c594bfe3a4
commit e3f1eedbfc
3 changed files with 11 additions and 4 deletions

View File

@ -22,4 +22,6 @@
]; ];
cursor.no_hardware_cursors = 1; cursor.no_hardware_cursors = 1;
}; };
mods.hyprland.autoSuspend = false;
} }

View File

@ -1,6 +1,12 @@
{ lib, config, ... }: { lib, config, ... }:
{ {
options.mods.hyprland.autoSuspend = lib.mkOption {
type = lib.types.bool;
default = true;
description = "enable hypridle suspend after 10min";
};
config = lib.mkIf config.mods.hyprland.enable { config = lib.mkIf config.mods.hyprland.enable {
services.hypridle = { services.hypridle = {
enable = true; enable = true;
@ -17,11 +23,10 @@
timeout = 150; timeout = 150;
on-timeout = "loginctl lock-session"; on-timeout = "loginctl lock-session";
} }
{ ] ++ lib.lists.optional config.mods.hyprland.autoSuspend [{
timeout = 600; timeout = 600;
on-timeout = "systemctl suspend"; on-timeout = "systemctl suspend";
} }];
];
}; };
}; };
}; };

View File

@ -6,7 +6,7 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ # # By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2025/02/09 22:01:56 by tomoron #+# #+# # # Created: 2025/02/09 22:01:56 by tomoron #+# #+# #
# Updated: 2025/02/26 16:47:27 by tomoron ### ########.fr # # Updated: 2025/02/26 16:52:52 by tomoron ### ########.fr #
# # # #
# **************************************************************************** # # **************************************************************************** #