enable all displays before going to sleep
This commit is contained in:
parent
d80969a667
commit
218d88751d
1 changed files with 8 additions and 5 deletions
|
@ -4,18 +4,21 @@
|
||||||
not-when-audio = true;
|
not-when-audio = true;
|
||||||
not-when-fullscreen = true;
|
not-when-fullscreen = true;
|
||||||
environment = {
|
environment = {
|
||||||
"PRIMARY_DISPLAY" = "$(xrandr | awk '/ primary/{print $1}')";
|
"PRIMARY_DISPLAY" = "$(${pkgs.xorg.xrandr} | awk '/ primary/{print $1}')";
|
||||||
};
|
};
|
||||||
timers = [
|
timers = [
|
||||||
{
|
{
|
||||||
delay = 60;
|
delay = 60;
|
||||||
command = ''xrandr --output "$PRIMARY_DISPLAY" --brightness .1'';
|
command =
|
||||||
canceller = ''xrandr --output "$PRIMARY_DISPLAY" --brightness 1'';
|
''${pkgs.xorg.xrandr} --output "$PRIMARY_DISPLAY" --brightness .1'';
|
||||||
|
canceller =
|
||||||
|
''${pkgs.xorg.xrandr} --output "$PRIMARY_DISPLAY" --brightness 1'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
delay = 600;
|
delay = 240;
|
||||||
command = "${pkgs.writeShellScript "my-script" ''
|
command = "${pkgs.writeShellScript "my-script" ''
|
||||||
xrandr --output "$PRIMARY_DISPLAY" --brightness 1
|
${pkgs.xorg.xrandr}/bin/xrandr --output "$PRIMARY_DISPLAY" --brightness 1
|
||||||
|
${pkgs.xorg.xrandr}/bin/xrandr --auto
|
||||||
systemctl suspend
|
systemctl suspend
|
||||||
''}";
|
''}";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue