23 lines
732 B
Nix
23 lines
732 B
Nix
{ pkgs, ... }: {
|
|
home.packages = builtins.attrValues { inherit (pkgs) brillo; };
|
|
|
|
services.swayidle = {
|
|
enable = true;
|
|
events = [
|
|
{ event = "before-sleep"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; }
|
|
{ event = "lock"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; }
|
|
];
|
|
timeouts = [
|
|
{
|
|
timeout = 30;
|
|
command = "${pkgs.brillo}/bin/brillo -e -O; ${pkgs.brillo}/bin/brillo -e -S 30";
|
|
resumeCommand = "${pkgs.brillo}/bin/brillo -e -I";
|
|
}
|
|
{
|
|
timeout = 120;
|
|
command = "${pkgs.brillo}/bin/brillo -e -S 0; ${pkgs.way-lockscreen}/bin/way-lockscreen";
|
|
resumeCommand = "${pkgs.brillo}/bin/brillo -e -I";
|
|
}
|
|
];
|
|
};
|
|
}
|