Add Swayidle and add more monitors to config
This commit is contained in:
parent
74b2840bf7
commit
b532ebb5ae
7 changed files with 68 additions and 3 deletions
35
modules/home/wms/programs/swayidle/default.nix
Normal file
35
modules/home/wms/programs/swayidle/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue