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

Add count group flag in windowCount workspace selector prop #5499

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

sungyoonc
Copy link
Contributor

@sungyoonc sungyoonc commented Apr 8, 2024

Describe your PR, what does it fix/add?

Adds the groupCount workspace selector prop.
The groupCount is the same as the windowCount but it counts groups instead of windows in a workspace.
Resolves #5488

Workspace rules can now do

workspace = g[t1], bordersize:10

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

A comment here shows an example using windowCount with range 0-4. But this is invalid according to the code. Did you meant to make 0-4 a valid range or just typo in the comment?

// w - windowCount: w[0-4] or w[1], optional flag t or f for tiled or floating, e.g. w[t0-1]
if (to < from || to < 1 || from < 1) {
    Debug::log(LOG, "Invalid selector {}", selector);
    return false;
}

Is it ready for merging, or does it need work?

Ready, but wiki mr needed.

@sungyoonc sungyoonc changed the title Workspace rules group prop Add groupCount workspace selector prop Apr 8, 2024
@vaxerski
Copy link
Member

vaxerski commented Apr 8, 2024

why not integrate it with w? w[gt1-2]

@sungyoonc sungyoonc changed the title Add groupCount workspace selector prop Add count group flag in windowCount workspace selector prop Apr 8, 2024
@sungyoonc
Copy link
Contributor Author

why not integrate it with w? w[gt1-2]

How about this?

@vaxerski
Copy link
Member

vaxerski commented Apr 8, 2024

okay, but I don't get why you're doing all that refactoring outside of what you are adding. I'd rather it wasn't there.

@sungyoonc
Copy link
Contributor Author

sungyoonc commented Apr 8, 2024

Removed all the refactoring bits. Should I make a separate mr or just scrap it?

In the current state, making a window into a group doesn't update other windows in that workspace.

@vaxerski
Copy link
Member

vaxerski commented Apr 9, 2024

Removed all the refactoring bits. Should I make a separate mr or just scrap it?

No, they are fine, just unrelated to this MR. Feel free to make it separately

@vaxerski vaxerski merged commit fcac25b into hyprwm:main Apr 9, 2024
9 checks passed
@vaxerski
Copy link
Member

vaxerski commented Apr 9, 2024

can you make a wiki mr?

@sungyoonc
Copy link
Contributor Author

Here hyprwm/hyprland-wiki#585

lisuke pushed a commit to lisuke/Hyprland that referenced this pull request Apr 15, 2024
hyprwm#5499)

* Add groupCount workspace selector prop

* Intergrate groupCount with windowCount
@zakk4223
Copy link
Contributor

Hmm, coming back to this now that it is in...

Are there any sets of selectors I can use that match tiled(windows+groups) = ?

(I guess you can kinda do it with multiple workspace rules?)

@sungyoonc
Copy link
Contributor Author

I think mixed counting flag(non grouped window + groups) need to be added to support that.

@sungyoonc sungyoonc deleted the workspace-rules-group-prop branch April 27, 2024 03:40
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.

workspace rule selector like window counts, but for 'containers'
3 participants