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 pseudo field for windowrulev2 #8623

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

Conversation

fliplus
Copy link

@fliplus fliplus commented Nov 30, 2024

Describe your PR, what does it fix/add?

As the title says, this adds a "pseudo:" field for windowrulev2.

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

It's ready.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm. I don't like this. Pseudo is... technically layout-specific. Maybe we should add some method to define layout-specific windowrules? like layout:...?

@fliplus
Copy link
Author

fliplus commented Dec 3, 2024

hm. I don't like this. Pseudo is... technically layout-specific. Maybe we should add some method to define layout-specific windowrules? like layout:...?

Indeed, pseudo: is technically layout-specific, but the window still holds the pseudo attribute on every layout.
That being said, I added a layout: field and made so updateDynamicRules() is called on all windows every time handleWindowRuleV2() is ran.

@vaxerski
Copy link
Member

vaxerski commented Dec 5, 2024

hm, I am unsure how to deal with this... nicely. Considering pseudo is exposed to everything, I'd say let's just keep it the old way for now I guess.. I'll do something in the future with this

@zakk4223
Copy link
Contributor

zakk4223 commented Dec 5, 2024

Stupid question/suggestion. Can't you just use window tagging for some of this? Layouts change behavior/do magic stuff based on existence of some window tag(s). Users can tag windows however they want (rules, manually etc) and stuff Just Works[tm].

Just document which tags do what for the layouts.

I dunno, just seems like the tag system could lead to some pretty useful/powerful stuff layout wise if the layouts wanted to take advantage. I guess the one downside is tags can't have values, hmmm.

You'd still have the 'layout specific and possibly colliding' thing either way tho. Although some tags might make sense to share between layouts (all master/stack based layouts could use a 'master' tag on windows to place them into the master stack, etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants