1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 03:29:45 +01:00

swayidle: make -w optional

The option -w causes swayidle to wait on timeouts/events to finish.
This can cause problems with certain timout/event commands (see
https://github.com/swaywm/swaylock/issues/86#issuecomment-662702180)
This commit is contained in:
leoTlr 2024-09-20 11:13:54 +02:00 committed by GitHub
parent 8d7e352a4b
commit 4803bf558b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 26 additions and 4 deletions

View file

@ -7,7 +7,16 @@ is therefore not final.
This release has the following notable changes:
- No changes.
- The swayidle module behavior has changed. Specifically, swayidle was
previously always called with a `-w` flag. This flag is now moved to
the default
[services.swayidle.extraArgs](#opt-services.swayidle.extraArgs)
value to make it optional.
Your configuration may break if you already set this option and also
rely on the flag being automatically added. To resolve this, please
add `-w` to your assignment of
[services.swayidle.extraArgs](#opt-services.swayidle.extraArgs).
## State Version Changes {#sec-release-24.11-state-version-changes}

View file

@ -1734,6 +1734,20 @@ in {
list of themes.
'';
}
{
time = "2024-09-20T07:48:08+00:00";
condition = hostPlatform.isLinux && config.services.swayidle.enable;
message = ''
The swayidle module behavior has changed. Specifically, swayidle was
previously always called with a `-w` flag. This flag is now moved to
the default `services.swayidle.extraArgs` value to make it optional.
Your configuration may break if you already set this option and also
rely on the flag being automatically added. To resolve this, please
add `-w` to your assignment of `services.swayidle.extraArgs`.
'';
}
];
};
}

View file

@ -94,7 +94,7 @@ in {
extraArgs = mkOption {
type = with types; listOf str;
default = [ ];
default = [ "-w" ];
description = "Extra arguments to pass to swayidle.";
};
@ -127,8 +127,7 @@ in {
Restart = "always";
# swayidle executes commands using "sh -c", so the PATH needs to contain a shell.
Environment = [ "PATH=${makeBinPath [ pkgs.bash ]}" ];
ExecStart =
"${cfg.package}/bin/swayidle -w ${concatStringsSep " " args}";
ExecStart = "${cfg.package}/bin/swayidle ${concatStringsSep " " args}";
};
Install = { WantedBy = [ cfg.systemdTarget ]; };