Add Swayidle and add more monitors to config

This commit is contained in:
Bun 2025-05-08 21:12:29 -04:00
parent 74b2840bf7
commit b532ebb5ae
7 changed files with 68 additions and 3 deletions

View file

@ -0,0 +1,35 @@
{ config, lib, pkgs, ... }:
{
config = lib.mkIf config.home.desktop.enable {
services.swayidle = {
enable = config.home.desktop.enable;
timeouts = [
{
timeout = 1800;
command = "notify-send 'Locking in 30 seconds'";
}
{
timeout = 1830;
command = "swaylock";
}
{
timeout = 3600;
command = "swaymsg 'output * dpms off'";
resumeCommand = "swaymsg 'output * dpms on'";
}
{
timeout = 3605;
command = "systemctl suspend";
}
];
events = [
{
event = "before-sleep";
command = "swaylock";
}
];
};
home.packages = with pkgs; [ sway-audio-idle-inhibit ];
};
}