set up swaylock and swayidle
This commit is contained in:
parent
0537951879
commit
6de5076d42
6 changed files with 37 additions and 0 deletions
20
home/desktop/hyprland/swayidle.nix
Normal file
20
home/desktop/hyprland/swayidle.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config, ... }: let
|
||||
swaylock = "${config.programs.swaylock.package}/bin/swaylock";
|
||||
in {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
systemdTarget = "graphical-session.target";
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${swaylock} --daemonize";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 4 * 60;
|
||||
command = "${swaylock} --daemonize --grace 15";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue