dpms off on idle
This commit is contained in:
parent
cf9ea43e97
commit
4975120fd2
1 changed files with 13 additions and 3 deletions
|
@ -1,17 +1,27 @@
|
|||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
swaylock = "${pkgs.swaylock}/bin/swaylock";
|
||||
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
||||
in
|
||||
{
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
systemdTarget = "graphical-session.target";
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.swaylock}/bin/swaylock -f -i /tmp/lockpaper.jpg";
|
||||
command = "${swaylock} -f -i /tmp/lockpaper.jpg";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 600;
|
||||
command = "${pkgs.swaylock}/bin/swaylock -f -i /tmp/lockpaper.jpg";
|
||||
command = "${swaylock} -f -i /tmp/lockpaper.jpg";
|
||||
}
|
||||
{
|
||||
timeout = 900;
|
||||
command = "${hyprctl} dispatch dpms off";
|
||||
resumeCommand = "${hyprctl} dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue