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

Support for negative regular expressions in the window title restrictions for floating windows #1674

Open
digitalcohesion opened this issue Aug 16, 2024 · 1 comment

Comments

@digitalcohesion
Copy link

Is your feature request related to a problem? Please describe.
I would like to be able to use a negative regular expression for floating window title restrictions. For example, in Messages I would like the main window which is called "Messages" to be constrained as normal, but if I open up a new window to a particular person I am messaging at the moment, I would like it to float.

Describe the solution you'd like
I was under the impression from another comment in other github issues that I could use regex patterns in the title restrictions. I have used some basic substring matching with Mail to achieve something similar where new messages that contain Re: or Fwd: are floated. In Messages however, the windows show up with titles based on the contact name so it could vary a lot. I tried using a regex like ^((?!Messages).)*$ which seems to work the way I want in regex testing tools, but still seems to match the Messages window when I use it in Amethyst.

Describe alternatives you've considered
I've tried multiple versions of "negative" regex's and nothing has worked. I don't have any other solutions besides manually managing the floating of Messages windows which is tedious enough that I am looking for alternative software options.

@digitalcohesion
Copy link
Author

I was wrong about the cause of this. It turns out that the title in the Window menu of Messages does not match the title property of the window object.

In looking at UI inspector I did discover there is a property on the window called main that some apps seem to use to mark the main window of the app versus other windows. Messages seems to use this flag for the "Messages" window. I'm wondering if an option to use that flag would work. Something like float non-main windows?

Or maybe there is some other option that would be better. Maybe float all windows but the first one or float all windows but one. Then if the float status is manually changed on a window it automatically toggles the status to just keep one window in the snapped position.

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

No branches or pull requests

1 participant