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

Allow exceptions to window swallowing #2002

Closed
mrkajetanp opened this issue Apr 9, 2023 · 6 comments
Closed

Allow exceptions to window swallowing #2002

mrkajetanp opened this issue Apr 9, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@mrkajetanp
Copy link
Contributor

As far as I can see, under the current implementation window swallowing is pretty much all or nothing - if I add the terminal in the regex, it will swallow any window it spawns. While that's the desired behaviour almost all the time there's occasionally some exceptions (like wev) where you want to keep the default behaviour. Could we add something like swallow_exception_regex for this use case?

@mrkajetanp mrkajetanp added the enhancement New feature or request label Apr 9, 2023
@vaxerski
Copy link
Member

vaxerski commented Apr 9, 2023

how would you even except that to work?? Can't you just make a regex that does not target that one thing that you don't want to swallow?

@grappas
Copy link

grappas commented Apr 9, 2023

I think swallow_regex =^(classes)$ but in reverse (not terminals but child windows like wev for example)

@tchofy
Copy link

tchofy commented Apr 9, 2023

Most terminals put the working application on their title, or can be configured to do so, so what about excluding by title?
I'm not particularly good with regex yet, but I think it'd go something like: swallow_regex=class:kitty,title:^(?!wev)$

@mrkajetanp
Copy link
Contributor Author

I think swallow_regex =^(classes)$ but in reverse (not terminals but child windows like wev for example)

Yes exactly, other WMs that do swallowing like DWM for instance already have this functionality. Implementation-wise it just boils down to matching against the regex before a window is about to be swallowed to see if it's one of the exceptions or not.

I implemented a PR that does just that, it's the one mentioned right above this comment. I tested it on my machine and now it works as intended.

@MightyPlaza
Copy link
Contributor

why this open?

@mrkajetanp
Copy link
Contributor Author

Good question, probably oversight.. I'll close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants