Auto-commit: 2026-01-05 19:52:54
This commit is contained in:
24
home/desktop/hyprland/hypridle.nix
Normal file
24
home/desktop/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ lib, nixosConfig, ... }:
|
||||
let
|
||||
cfg = nixosConfig.my.desktop;
|
||||
in
|
||||
{
|
||||
services.hypridle = lib.mkIf (cfg.enable && cfg.hyprland.enable) {
|
||||
enable = true;
|
||||
systemdTarget = "hyprland-session.target";
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "hyprlock";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 300; # 2mins
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user