53 lines
944 B
Nix
53 lines
944 B
Nix
{ inputs, ... }:
|
|
{
|
|
services.swayidle = {
|
|
enable = true;
|
|
|
|
events = [
|
|
{
|
|
event = "lock";
|
|
command = "pidof hyprlock || hyprlock";
|
|
}
|
|
|
|
{
|
|
event = "after-resume";
|
|
command = "shikanectl reload && brillo -e -u 150000 -I";
|
|
}
|
|
];
|
|
|
|
timeouts = [
|
|
{
|
|
timeout = 60;
|
|
command = "dim-all-monitors";
|
|
}
|
|
|
|
# battery timers
|
|
{
|
|
timeout = 120;
|
|
command = "systemd-ac-power || lock-power-off-monitors";
|
|
}
|
|
{
|
|
timeout = 180;
|
|
command = "systemd-ac-power || lock-suspend";
|
|
}
|
|
|
|
# ac power timers
|
|
{
|
|
timeout = 180;
|
|
command = "systemd-ac-power && loginctl lock-session";
|
|
}
|
|
|
|
{
|
|
timeout = 240;
|
|
command = "systemd-ac-power && lock-power-off-monitors";
|
|
}
|
|
|
|
{
|
|
timeout = 600;
|
|
command = "systemd-ac-power && lock-suspend";
|
|
}
|
|
];
|
|
|
|
};
|
|
|
|
}
|