-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
feat: auto_group #7883
feat: auto_group #7883
Conversation
Clang format 🙏 |
Wouldn't it be better to extend the grouping window rules to include the desired floating group behavior? |
Yes, when we solve the bug, I will do that if possible. |
I'm saying that group:auto_group shouldn't exist if you can do it via window rules. Having two ways to do the exact same thing is confusing. On top of that you have to worry about how the two methods interact |
This PR is for general behavior that target all new windows created when focusing a group. In contrast, window rules target a window following regex, it is used for a specific target, or fine tuning.
They don't conflict with each other. |
You can target all windows with a window rule |
Yes. The behavior that you can not target with window rules and what this code does is the following: when you are focusing a tiled or floating group, new windows that you create will be part of it. If you are not focusing the group though, or if the group is locked, new windows will take a new surface. Part of this code already exists in main hyprland as can be seen in the diff for tiling groups, but it is completed with tiled and floated groups in tiling and floating mode, and with a user config allowing to enable or disable it. |
Ok, the floating group bug is fixed. Now I will try to fix the bugs remaining. |
Could you rebase commits? So it has a commit with clang format so it doesn't have multiple times repead commit names as clang-format |
3c24673
to
f7151e5
Compare
Done rebasing for cleaning up the commit history. |
9b0fb4e
to
a978564
Compare
…oating groups: the floating groups can't receive new windows.
9a5a996
to
479effc
Compare
is no longer reproduceable
Nevermind, Xwayland's popups are broken... |
Fixed. I'm gonna try to refactor the code now. |
@vaxerski I have unified all the code into the new function: |
I have made a new refactor to the code. No trace of recursion, it is a straight path now. |
Done. I have also simplified the code where possible. There is one conversation remaining though. |
…has 0 size when: + allfloat = true (new windows start as floating). + create a new window, tile it, and make it a group + create a new window autogrouped into the tiled group. + call togglefloat and the window disappears.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outside of that cursed {} all good
Done. Thanks for your attention and patience. It was a pleasure working on this for Hyprland. Cheers ! |
* auto_group For hyprwm/Hyprland#7883 * grammar * grammar * grammar * simplify it
Describe your PR, what does it fix/add?
The behavior before this was to auto group only tiled groups when the tiling mode was enabled (allfloat=false on the workspace). This PR gives you the auto group feature for tiled and floating groups when the tiling mode is enabled and also when the floating mode is enabled (allfloat=true on the workspace).
Furthermore, this gives you the freedom to configure whether new windows will be automatically grouped into the focused unlocked group. Wiki
Fixes: #7840
Is it ready for merging, or does it need work?
It is ready.