1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 15:41:02 +01:00

hypridle: add module

This commit is contained in:
Austin Horstman 2024-05-05 04:13:18 -05:00 committed by GitHub
parent f69bf670d2
commit fdaaf543ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 163 additions and 0 deletions

View file

@ -0,0 +1,38 @@
{ pkgs, ... }:
{
services.hypridle = {
enable = true;
package = pkgs.hypridle;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 900;
on-timeout = "hyprlock";
}
{
timeout = 1200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
test.stubs.hypridle = { };
nmt.script = ''
config=home-files/.config/hypr/hypridle.conf
clientServiceFile=home-files/.config/systemd/user/hypridle.service
assertFileExists $config
assertFileExists $clientServiceFile
assertFileContent $config ${./hypridle.conf}
'';
}