2023-04-10 23:06:43 +05:30
|
|
|
{ pkgs, ... }:
|
2023-04-09 20:36:56 +05:30
|
|
|
let
|
|
|
|
swaylock = "${pkgs.swaylock}/bin/swaylock";
|
|
|
|
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
|
|
|
in
|
|
|
|
{
|
2023-04-07 19:21:33 +05:30
|
|
|
services.swayidle = {
|
|
|
|
enable = true;
|
2023-04-08 14:40:44 +05:30
|
|
|
systemdTarget = "graphical-session.target";
|
2023-04-07 19:21:33 +05:30
|
|
|
events = [
|
|
|
|
{
|
|
|
|
event = "before-sleep";
|
2023-04-09 20:36:56 +05:30
|
|
|
command = "${swaylock} -f -i /tmp/lockpaper.jpg";
|
2023-04-07 19:21:33 +05:30
|
|
|
}
|
|
|
|
];
|
|
|
|
timeouts = [
|
|
|
|
{
|
|
|
|
timeout = 600;
|
2023-04-09 20:36:56 +05:30
|
|
|
command = "${swaylock} -f -i /tmp/lockpaper.jpg";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
timeout = 900;
|
|
|
|
command = "${hyprctl} dispatch dpms off";
|
|
|
|
resumeCommand = "${hyprctl} dispatch dpms on";
|
2023-04-07 19:21:33 +05:30
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2023-03-15 22:11:59 +05:30
|
|
|
}
|