home: swaylock: notification -> dim screen
This commit is contained in:
parent
71a8623821
commit
a5ece60862
1 changed files with 6 additions and 6 deletions
|
@ -10,23 +10,23 @@
|
||||||
|
|
||||||
services.swayidle = let
|
services.swayidle = let
|
||||||
lock = lib.getExe config.programs.swaylock.package;
|
lock = lib.getExe config.programs.swaylock.package;
|
||||||
displayOn = ''${pkgs.sway}/bin/swaymsg "output * power on"'';
|
brightness = lib.getExe pkgs.brightnessctl;
|
||||||
displayOff = ''${pkgs.sway}/bin/swaymsg "output * power off"'';
|
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{
|
{
|
||||||
timeout = 60 * 9;
|
timeout = 60 * 9;
|
||||||
command = ''${lib.getExe pkgs.libnotify} -u critical --expire-time 60000 "60 seconds until lock!"'';
|
command = "${brightness} set $(($(${brightness} get)/4))";
|
||||||
}
|
resumeCommand = "${brightness} set $(($(${brightness} get)*4))";
|
||||||
|
} # dim screen
|
||||||
{
|
{
|
||||||
timeout = 60 * 10;
|
timeout = 60 * 10;
|
||||||
command = lock;
|
command = lock;
|
||||||
} # lock screen
|
} # lock screen
|
||||||
{
|
{
|
||||||
timeout = 60 * 20;
|
timeout = 60 * 20;
|
||||||
command = displayOff;
|
command = ''${pkgs.sway}/bin/swaymsg "output * power off"'';
|
||||||
resumeCommand = displayOn;
|
resumeCommand = ''${pkgs.sway}/bin/swaymsg "output * power on"'';
|
||||||
} # turn off screen
|
} # turn off screen
|
||||||
{
|
{
|
||||||
timeout = 60 * 30;
|
timeout = 60 * 30;
|
||||||
|
|
Loading…
Reference in a new issue