mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
Wrap hypridle
This commit is contained in:
parent
d422206b97
commit
d33cc160fc
2 changed files with 43 additions and 29 deletions
|
|
@ -11,35 +11,7 @@
|
|||
config = lib.mkIf config.myConfig.de.hypridlelock.enable {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd =
|
||||
let
|
||||
hyprlockExe = "${lib.getExe wrappers.hyprlock}";
|
||||
in
|
||||
"pidof ${hyprlockExe} || ${hyprlockExe}";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "${lib.getExe pkgs.brightnessctl} -s && ${lib.getExe pkgs.brightnessctl} -e set 10%";
|
||||
on-resume = "${lib.getExe pkgs.brightnessctl} -r";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 610;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
package = wrappers.hypridle { };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue