hypridle: use home manager module for hypridle
This commit is contained in:
parent
0bfdafe9d9
commit
2e72b14d49
|
@ -4,30 +4,30 @@ let
|
|||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ unstable.hypridle ];
|
||||
|
||||
home.file.".config/hypr/hypridle.conf".text = /*hyprlang*/ ''
|
||||
general {
|
||||
lock_cmd = "pidof hyprlock || hyprlock"
|
||||
before_sleep_cmd = "hyprlock"
|
||||
after_sleep_cmd = hyprctl dispatch dpms on
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = cfg.hypridle.lockTimeout;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = ${toString cfg.hypridle.lockTimeout}
|
||||
on-timeout = "hyprlock"
|
||||
{
|
||||
timeout = cfg.hypridle.dpmsTimeout;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = ${toString cfg.hypridle.dpmsTimeout}
|
||||
on-timeout = hyprctl dispatch dpms off
|
||||
on-resume = hyprctl dispatch dpms on
|
||||
{
|
||||
timeout = cfg.hypridle.suspendTimeout;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = ${toString cfg.hypridle.suspendTimeout}
|
||||
on-timeout = systemctl suspend
|
||||
}
|
||||
'';
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue