nix/modules/wm/hypridle/default.nix

30 lines
590 B
Nix
Raw Normal View History

2024-09-01 21:55:50 +02:00
{
lib,
config,
...
}: {
options = {
2024-09-15 10:00:51 +02:00
hypridle.enable = lib.mkEnableOption "";
2024-09-01 19:10:52 +02:00
};
2024-09-01 21:55:50 +02:00
2024-09-01 19:10:52 +02:00
config = lib.mkIf config.hypridle.enable {
home-manager.users.joy.services.hypridle = {
enable = true;
settings = {
listener = [
{
timeout = 300;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 600;
on-timeout = "systemctl suspend";
on-resume = "hyprctl dispatch dpms on";
}
];
};
2024-08-31 16:04:57 +02:00
};
};
}