sway: Power on individual displays so order maybe is preserved

This commit is contained in:
Erwin Boskma 2024-02-23 11:32:03 +01:00
parent 2c9f3cc24d
commit 441a7f8104
Signed by: erwin
SSH key fingerprint: SHA256:OCinH/khuGY1LA9RG8YLM8GNH6C1DDXBdy3SNE+I5Hw

View file

@ -332,7 +332,13 @@ in
}
];
timeouts = [
timeouts =
let
resumeMessages = builtins.concatStringsSep ", " (
builtins.map (name: "output ${name} power on") (builtins.attrNames cfg.output)
);
in
[
{
timeout = 900;
command = swaylockcmd;
@ -340,7 +346,7 @@ in
{
timeout = 1200;
command = "${pkgs.sway}/bin/swaymsg 'output * power off'";
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * power on'";
resumeCommand = "${pkgs.sway}/bin/swaymsg '${resumeMessages}'";
}
];
};