50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{ inputs, ... }:
|
|
{
|
|
services.hypridle = {
|
|
enable = true;
|
|
package = inputs.hypridle.packages.x86_64-linux.default;
|
|
settings = {
|
|
general = {
|
|
lock_cmd = "pidof hyprlock || hyprlock";
|
|
before_sleep_cmd = "loginctl lock-session";
|
|
after_sleep_cmd = "shikanectl reload && brillo -e -u 150000 -I";
|
|
ignore_dbus_inhibit = false;
|
|
ignore_systemd_inhibit = false;
|
|
};
|
|
|
|
listener = [
|
|
{
|
|
timeout = "60";
|
|
on-timeout = "dim-all-monitors";
|
|
}
|
|
|
|
# battery timers
|
|
{
|
|
timeout = "120";
|
|
on-timeout = "systemd-ac-power || lock-power-off-monitors";
|
|
}
|
|
{
|
|
timeout = "180";
|
|
on-timeout = "systemd-ac-power || lock-suspend";
|
|
}
|
|
|
|
# ac power timers
|
|
{
|
|
timeout = "180";
|
|
on-timeout = "systemd-ac-power && loginctl lock-session";
|
|
}
|
|
|
|
{
|
|
timeout = "240";
|
|
on-timeout = "systemd-ac-power && lock-power-off-monitors";
|
|
}
|
|
|
|
{
|
|
timeout = "600";
|
|
on-timeout = "systemd-ac-power && lock-suspend";
|
|
}
|
|
];
|
|
|
|
};
|
|
};
|
|
}
|