switching to swaylock/idle adding qmk

This commit is contained in:
Matt Nish-Lapidus 2025-06-28 13:00:19 -04:00
parent 16437c9f62
commit 260e597860
11 changed files with 122 additions and 405 deletions

View file

@ -0,0 +1,69 @@
{
services.swayidle = {
enable = true;
events = [
{
event = "lock";
command = "/home/emenel/.local/bin/session-lock";
}
{
event = "after-resume";
command = "/home/emenel/.local/bin/on-unlock";
}
];
timeouts = [
{
timeout = 60;
command = "/home/emenel/.local/bin/dim-all-monitors";
}
# battery timers
{
timeout = 90;
command = "systemd-ac-power || loginctl lock-session";
}
{
timeout = 120;
command = "systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
}
{
timeout = 180;
command = "systemd-ac-power || /home/emenel/.local/bin/lock-suspend";
}
# ac power timers
{
timeout = 180;
command = "systemd-ac-power && loginctl lock-session";
}
{
timeout = 240;
command = "systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
}
{
timeout = 600;
command = "systemd-ac-power && /home/emenel/.local/bin/lock-suspend";
}
];
};
programs.swaylock = {
enable = true;
settings = {
color = "808080";
font-size = 24;
indicator-idle-visible = true;
indicator-radius = 100;
line-color = "ffffff";
show-failed-attempts = true;
};
};
}