You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many window managers allow for you to apply a window rule for all windows which match a specific regular expression pattern. Currently, komorebi appears to apply rules based on the string equality of the window class name, executable name or title text.
By adding regex support for window rule defenitions, the window manager would be able to apply rules for a variety of windows without having an excessive amount of definitions. Additionally, the use of regular expression wildcards allows for powerful application of window rules:
komorebic.exe float-rule class "jetbrains-(.*)"
If possible, it may also be useful to pass multiple combinations of rule matches into a single komorebic.exe float-rule command:
komorebic.exe float-rule --class "jetbrains-(.*)" --title "Welcome to (.*)"
This would allow the user to combine a number of regular expressions based on various window attributes. The above example would apply a floating rule to all jetbrains windows which contain the title "Welcome to ..."
The text was updated successfully, but these errors were encountered:
da-rth
changed the title
Feature request: Define window rules using regular expression patterns
Feature request: Apply window rules via matching regular expression patterns
Oct 29, 2021
This commit is the first in a series of commits which will pave the way
for regex rule matching support in komorebi.
For now, in order to maintain backwards compat and not break anything,
all rules without a matching strategy will get assigned as using the
"Legacy" strategy.
This and the "Equals" strategy are the only two which have been
implemented so far.
There should not be any breaking changes in this commit, not any
functionality lost for users with pre-existing configurations.
re #60
This commit ensures that matching strategies can be used wherever
IdWithIdentifier is used, and that they are respected for users opting
to use the static configuration file format.
Some thought and planning needs to go into how this can be backported to
dynamic configurations via the CLI without breaking existing user
configurations.
re #60
Many window managers allow for you to apply a window rule for all windows which match a specific regular expression pattern. Currently, komorebi appears to apply rules based on the string equality of the window class name, executable name or title text.
By adding regex support for window rule defenitions, the window manager would be able to apply rules for a variety of windows without having an excessive amount of definitions. Additionally, the use of regular expression wildcards allows for powerful application of window rules:
If possible, it may also be useful to pass multiple combinations of rule matches into a single
komorebic.exe float-rule
command:This would allow the user to combine a number of regular expressions based on various window attributes. The above example would apply a floating rule to all jetbrains windows which contain the title "Welcome to ..."
The text was updated successfully, but these errors were encountered: