further refinements
This commit is contained in:
parent
0c2b2cee68
commit
2d030ab678
14 changed files with 330 additions and 282 deletions
35
home/modules/hypridle.nix
Normal file
35
home/modules/hypridle.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
isNixOS = builtins.pathExists /etc/NIXOS;
|
||||
in
|
||||
{
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
package = lib.mkIf (!isNixOS) null;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "wp lock && hyprlock";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "wp lock && hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 1800;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue