Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kwin): Standardize Virtual Desktop IDs in KDE Plasma for Consistent Window Rules Configuration #408

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

sidmoreoss
Copy link

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 attribute apply.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"—where n represents the total number of virtual desktops configured. By assigning consistent IDs, configurations in windowRules (such as the example shown below) can reliably apply to the intended desktops.

Example Configuration

{
  description = "Virtual desktop for browsers";
  apply.desktops = "Desktop_1";  # Standardized ID for consistent reference
  match.window-class = {
    value = mkWmClassPattern appGroups.browsers;
    type = "regex";
  };
}

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.

@sidmoreoss sidmoreoss changed the title Standardize Virtual Desktop IDs in KDE Plasma for Consistent Window Rules Configuration fix(kwin): Standardize Virtual Desktop IDs in KDE Plasma for Consistent Window Rules Configuration Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant