Skip to content

feat(desktop): make floating window rules configurable - #2157

Draft
abachmann wants to merge 2 commits into
pop-os:masterfrom
abachmann:system-tiling-rules
Draft

feat(desktop): make floating window rules configurable#2157
abachmann wants to merge 2 commits into
pop-os:masterfrom
abachmann:system-tiling-rules

Conversation

@abachmann

@abachmann abachmann commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This PR makes the compositor's system rules configurable and adds a UI for creating custom exceptions according to the layout described in: #438.

Depends on:

Backend

User config: ~/.config/cosmic/com.system76.CosmicSettings.WindowRules/v1/tiling_exception_custom

When the user changes the default value of a system rule, a new entry is added to the users config:

[
    (
        appid: "my.custom.rule",
        title: "My Custom Application",
        enabled: false,
    ),
    (
        appid: "",
        title: "wl-clipboard",
        enabled: false,
    ),
]

When the user resets the value to its default, the corresponding entry is removed from the users config, while custom rules are preserved:

[
    (
        appid: "my.custom.rule",
        title: "My Custom Application",
        enabled: false,
    ),
]

UI

Window management
image

Floating window exceptions - without custom exceptions
image

Floating window exceptions - with custom exceptions
image

Floating window exceptions - custom exception selection
image

Floating window exceptions - custom exception selection, no entries
image

Built-in exceptions
image


  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

@abachmann
abachmann force-pushed the system-tiling-rules branch from 165702e to 5d2b43f Compare August 21, 2026 17:05
@mmstick
mmstick requested review from a team August 21, 2026 18:03
@mmstick

mmstick commented Aug 21, 2026

Copy link
Copy Markdown
Member

This should also make it possible to add and remove custom exceptions.

@abachmann

Copy link
Copy Markdown
Contributor Author

This should also make it possible to add and remove custom exceptions.

My intention was to implement this feature incrementally, but we can also do all at once. This is up to you.

@mmstick

mmstick commented Aug 21, 2026

Copy link
Copy Markdown
Member

We can't merge incomplete features so it will need this too.

@abachmann

Copy link
Copy Markdown
Contributor Author

We can't merge incomplete features so it will need this too.

According to this logic, the Launching windows below a minimum size feature also needs to be implemented. Could you please explain it to me? I have no idea what it means or what minimum means in this case.

@mmstick

mmstick commented Aug 21, 2026

Copy link
Copy Markdown
Member

Not sure how that relates to the window tiling exceptions config settings page

@abachmann

Copy link
Copy Markdown
Contributor Author

Not sure how that relates to the window tiling exceptions config settings page

You can argue in different ways about what constitutes a complete feature:

  1. Supporting a way to modify the system tiling exceptions. This is a self contained feature that provides value to the user on its own
  2. Fully implementing tiling exception handling, combining system exceptions and custom exceptions
  3. Implementing all features described in (which includes Launching windows below a minimum size): Settings > Desktop > Window Management #438

However, I have now also implemented custom tiling exceptions. Please have a look

@abachmann abachmann changed the title feat(desktop): make system tiling rules configurable feat(desktop): make tiling rules configurable Aug 21, 2026
@abachmann abachmann changed the title feat(desktop): make tiling rules configurable feat(desktop): make floating window rules configurable Aug 21, 2026
@abachmann
abachmann marked this pull request as draft August 22, 2026 16:55
@abachmann

Copy link
Copy Markdown
Contributor Author

I put this PR into draft as pop-os/cosmic-comp#2741 needs to be implemented first. In the current implementation I open a context menu to show all running windows

@mmstick

mmstick commented Aug 25, 2026

Copy link
Copy Markdown
Member

You can argue in different ways about what constitutes a complete feature:

8308839 is what I was referring to in my original comment. We don't necessarily need to have a floating window picker GUI right now. Just the ability to add, remove, and edit the user's own custom tiling exceptions. It would be an odd choice if we shipped the tiling exceptions page to users with only a single item on the page that opens a context drawer for toggling system exceptions. The primary purpose of this page is to provide a GUI for managing custom exceptions. Which of course includes toggling system exceptions too.

@abachmann abachmann closed this Aug 25, 2026
@abachmann abachmann reopened this Aug 25, 2026
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.

2 participants