major refactor and reorg

This commit is contained in:
Matt Nish-Lapidus 2025-02-05 00:50:55 -05:00
parent 0a9342ea3e
commit 332b345753
11 changed files with 290 additions and 78 deletions

62
modules/home/hypridle.nix Normal file
View file

@ -0,0 +1,62 @@
{ 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";
};
# TODO: add monitor shut off timout
# battery timers
listener = [
{
timeout = 30;
on-timeout = "systemd-ac-power || light -S 0";
on-resume = "systemd-ac-power || light -I";
}
{
timeout = "30";
on-timeout = "systemd-ac-power || light -s razer/0003:1532:02B6.0004/backlight -S 0";
on-resume = "systemd-ac-power || light -s razer/0003:1532:02B6.0004/backlight -S 40";
}
{
timeout = "120";
on-timeout = "systemd-ac-power || systemd-ac-power && loginctl lock-session";
}
{
timeout = "600";
on-timeout = "systemd-ac-power || systemctl suspend";
}
# ac power timers
{
timeout = "60";
on-timeout = "systemd-ac-power && light -S 0";
on-resume = "systemd-ac-power && light -I";
}
{
timeout = "60";
on-timeout = "systemd-ac-power && light -s razer/0003:1532:02B6.0004/backlight -S 0";
on-resume = "systemd-ac-power && light -s razer/0003:1532:02B6.0004/backlight -S 40";
}
{
timeout = "300";
on-timeout = "systemd-ac-power && loginctl lock-session";
}
{
timeout = "1800";
on-timeout = "systemd-ac-power && systemctl suspend";
}
];
};
};
}