🧹 Moved almost all files to /modules. Moved some code to separate files

This commit is contained in:
2025-01-05 19:14:37 +01:00
parent f0ac3a7705
commit b30376cdcf
101 changed files with 133 additions and 102 deletions

View File

@ -0,0 +1,37 @@
{ ... }:
let
# Time in seconds
lockAfter = 1200;
suspendAfter = 7200;
in
{
services.hypridle = {
enable = true;
settings = {
general = {
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
lock_cmd = "pidof hyprlock || hyprlock"; # Avoid running multiple instances of hyprlock
};
listener = [
# Lock
{
timeout = lockAfter;
on-timeout = "loginctl lock-session";
}
# Turn off screens TODO buggy main monitor, turns off and on after resume
# {
# timeout = 120;
# on-timeout = "hyprctl dispatch dpms off";
# on-resume = "hyprctl dispatch dpms on";
# }
# Suspend
{
timeout = suspendAfter;
on-timeout = "systemctl suspend"; # suspend pc
}
];
};
};
}