nixos-config/modules/home/hypridle.nix

62 lines
1.8 KiB
Nix
Raw Normal View History

2025-02-05 00:50:55 -05:00
{ inputs, ... }:
{
services.hypridle = {
enable = true;
package = inputs.hypridle.packages.x86_64-linux.default;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock";
2025-02-17 16:34:19 -05:00
before_sleep_cmd = "loginctl lock-session && brillo -e -O";
after_sleep_cmd = "/home/emenel/.local/bin/on-unlock";
2025-02-14 16:37:28 -05:00
ignore_dbus_inhibit = false;
ignore_systemd_inhibit = false;
2025-02-05 00:50:55 -05:00
};
2025-02-06 13:56:58 -05:00
2025-02-05 00:50:55 -05:00
listener = [
2025-02-16 16:24:34 -05:00
{
timeout = "60";
2025-02-17 16:34:19 -05:00
on-timeout = "/home/emenel/.local/bin/dim-all-monitors";
on-resume = "/home/emenel/.local/bin/on-unlock";
2025-02-16 16:24:34 -05:00
}
# battery timers
2025-02-17 16:34:19 -05:00
{
timeout = "90";
on-timeout = "systemd-ac-power || loginctl lock-session";
on-resume = "/home/emenel/.local/bin/on-unlock";
}
2025-02-05 00:50:55 -05:00
{
timeout = "120";
2025-02-17 16:34:19 -05:00
on-timeout = "systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
on-resume = "/home/emenel/.local/bin/on-unlock";
2025-02-05 00:50:55 -05:00
}
{
timeout = "180";
2025-02-17 16:34:19 -05:00
on-timeout = "systemd-ac-power || /home/emenel/.local/bin/lock-suspend";
on-resume = "/home/emenel/.local/bin/on-unlock";
2025-02-05 00:50:55 -05:00
}
# ac power timers
2025-02-14 14:52:10 -05:00
{
timeout = "180";
on-timeout = "systemd-ac-power && loginctl lock-session";
2025-02-17 16:34:19 -05:00
on-resume = "/home/emenel/.local/bin/on-unlock";
2025-02-14 14:52:10 -05:00
}
2025-02-05 00:50:55 -05:00
2025-02-16 16:24:34 -05:00
{
timeout = "240";
2025-02-17 16:34:19 -05:00
on-timeout = "systemd-ac-power && /home/emenel/.local/bin/lock-power-off-monitors";
on-resume = "/home/emenel/.local/bin/on-unlock";
2025-02-16 16:24:34 -05:00
}
2025-02-05 00:50:55 -05:00
{
2025-02-14 16:37:28 -05:00
timeout = "600";
2025-02-17 16:34:19 -05:00
on-timeout = "systemd-ac-power && /home/emenel/.local/bin/lock-suspend";
on-resume = "/home/emenel/.local/bin/on-unlock";
2025-02-05 00:50:55 -05:00
}
];
};
};
}