Swayidle: fix screen brightness with brillo
This commit is contained in:
parent
2ab8ef98d7
commit
81ff9e822e
1 changed files with 12 additions and 1 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
|
home.packages = builtins.attrValues { inherit (pkgs) brillo; };
|
||||||
|
|
||||||
services.swayidle = {
|
services.swayidle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
events = [
|
events = [
|
||||||
|
|
@ -6,7 +8,16 @@
|
||||||
{ event = "lock"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; }
|
{ event = "lock"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; }
|
||||||
];
|
];
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{ timeout = 120; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; }
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue