major refactor and reorg
This commit is contained in:
parent
0a9342ea3e
commit
332b345753
11 changed files with 290 additions and 78 deletions
62
modules/home/hypridle.nix
Normal file
62
modules/home/hypridle.nix
Normal 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";
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue