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";
|
|
|
|
before_sleep_cmd = "loginctl lock-session";
|
2025-02-16 16:39:10 -05:00
|
|
|
after_sleep_cmd = "shikanectl reload && brillo -e -u 150000 -I";
|
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-14 16:37:28 -05:00
|
|
|
|
|
|
|
# TODO add screen dimming and test configurations with different monitors
|
2025-02-05 00:50:55 -05:00
|
|
|
listener = [
|
2025-02-14 14:52:10 -05:00
|
|
|
# battery timers
|
2025-02-16 16:24:34 -05:00
|
|
|
{
|
|
|
|
timeout = "60";
|
|
|
|
on-timeout = "systemd-ac-power || dim-all-monitors";
|
|
|
|
}
|
2025-02-05 00:50:55 -05:00
|
|
|
{
|
|
|
|
timeout = "120";
|
2025-02-14 16:37:28 -05:00
|
|
|
on-timeout = "systemd-ac-power || lock-power-off-monitors";
|
2025-02-05 00:50:55 -05:00
|
|
|
}
|
|
|
|
{
|
2025-02-06 13:56:58 -05:00
|
|
|
timeout = "300";
|
2025-02-14 16:37:28 -05:00
|
|
|
on-timeout = "systemd-ac-power || lock-suspend";
|
2025-02-05 00:50:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
# ac power timers
|
2025-02-16 16:24:34 -05:00
|
|
|
{
|
|
|
|
timeout = "90";
|
|
|
|
on-timeout = "systemd-ac-power && dim-all-monitors";
|
|
|
|
}
|
|
|
|
|
2025-02-14 14:52:10 -05:00
|
|
|
{
|
|
|
|
timeout = "180";
|
|
|
|
on-timeout = "systemd-ac-power && loginctl lock-session";
|
|
|
|
}
|
2025-02-05 00:50:55 -05:00
|
|
|
|
2025-02-16 16:24:34 -05:00
|
|
|
{
|
|
|
|
timeout = "200";
|
|
|
|
on-timeout = "systemd-ac-power && lock-power-off-monitors";
|
|
|
|
}
|
|
|
|
|
2025-02-05 00:50:55 -05:00
|
|
|
{
|
2025-02-14 16:37:28 -05:00
|
|
|
timeout = "600";
|
2025-02-16 16:24:34 -05:00
|
|
|
on-timeout = "systemd-ac-power && lock-suspend";
|
2025-02-05 00:50:55 -05:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|