entirely vibed refactor

This commit is contained in:
alisceon 2026-03-10 21:50:51 +01:00
parent cea12431ff
commit c343c52ab7
78 changed files with 884 additions and 1099 deletions

View file

@ -0,0 +1,47 @@
{ pkgs, ... }:
let
commands = import ../../../lib/commands.nix { inherit pkgs; };
inherit (commands) notify lock display;
in
{
services.swayidle = {
enable = true;
timeouts = [
{
timeout = 120;
command = "${notify} 'Locking in 5 seconds' -t 5000";
}
{
timeout = 125;
command = lock;
}
{
timeout = 125;
command = display "off";
resumeCommand = display "on";
}
{
timeout = 600;
command = "${pkgs.systemd}/bin/systemctl suspend";
}
];
events = [
{
event = "before-sleep";
command = "display off; systemctl --user stop libinput-gestures; ${lock}";
}
{
event = "after-resume";
command = "display on; systemctl --user start libinput-gestures";
}
{
event = "lock";
command = (display "off") + "; " + lock;
}
{
event = "unlock";
command = display "on";
}
];
};
}