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 = {
|
services.swayidle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemdTarget = "graphical-session.target";
|
systemdTarget = "graphical-session.target";
|
||||||
events = [
|
events = [
|
||||||
{
|
{
|
||||||
event = "before-sleep";
|
event = "before-sleep";
|
||||||
command = "${pkgs.swaylock}/bin/swaylock -f -i /tmp/lockpaper.jpg";
|
command = "${swaylock} -f -i /tmp/lockpaper.jpg";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{
|
{
|
||||||
timeout = 600;
|
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