1
0
mirror of https://github.com/Andrey0189/nixos-config-reborn.git synced 2025-09-15 10:06:00 +03:00

add hypridle

This commit is contained in:
andrey_varnavskiy
2024-12-01 05:29:20 +05:00
parent 3fb18500f6
commit e97aef4a95
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
{
services.hypridle = {
enable = true;
settings = {
general = {
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || hyprlock";
};
listener = [
{
timeout = 180;
on-timeout = "brightnessctl -s set 30";
on-resume = "brightnessctl -r";
}
{
timeout = 300;
on-timeout = "loginctl lock-session";
}
{
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 1200;
on-timeout = "sysemctl suspend";
}
];
};
};
}