fix(kwin): Standardize Virtual Desktop IDs in KDE Plasma for Consistent Window Rules Configuration #408
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In KDE Plasma, virtual desktops are currently assigned unique IDs that are generated automatically and differ across systems and even builds. This random assignment causes issues when attempting to apply configuration rules that rely on specific desktop IDs. For instance, in the
windowRules
option, the attributeapply.desktops
allows users to target specific virtual desktops by ID. If these IDs are random, configurations specifying particular desktops (such as assigning certain applications to designated desktops) will not work consistently across systems.To ensure predictable and controlled behavior, it’s necessary to standardize these IDs so they follow a stable, easily-referenced naming scheme, such as
"Desktop_1"
,"Desktop_2"
, …,"Desktop_n"
—wheren
represents the total number of virtual desktops configured. By assigning consistent IDs, configurations inwindowRules
(such as the example shown below) can reliably apply to the intended desktops.Example Configuration
Here,
apply.desktops = "Desktop_1"
references a virtual desktop by a stable ID, ensuring that window rules consistently apply to the same desktop, even after system rebuilds. This approach would prevent configuration breakages and support more granular and stable control over window placements across virtual desktops.