feat(wm): add and enable swayidle
This commit is contained in:
parent
aa853d6703
commit
8ef74f0d75
2 changed files with 17 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
./hyprpaper.nix
|
||||
./niri
|
||||
./rofi
|
||||
./swayidle.nix
|
||||
./swaylock.nix
|
||||
./waybar
|
||||
./xdg.nix
|
||||
|
|
|
|||
16
home/wm/swayidle.nix
Normal file
16
home/wm/swayidle.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }: {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
|
||||
systemdTarget = "graphical-session.target";
|
||||
|
||||
events = [
|
||||
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
|
||||
];
|
||||
|
||||
timeouts = [
|
||||
{ timeout = 300; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
|
||||
{ timeout = 301; command = "${pkgs.niri}/bin/niri msg action power-off-monitors && ${pkgs.systemd}/bin/systemctl hibernate"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue