Feature request: Apply window rules via matching regular expression patterns #52

Closed
opened 2026-01-05 14:47:56 +01:00 by adam · 1 comment
Owner

Originally created by @da-rth on GitHub (Oct 29, 2021).

Originally assigned to: @LGUG2Z on GitHub.

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 ..."

Originally created by @da-rth on GitHub (Oct 29, 2021). Originally assigned to: @LGUG2Z on GitHub. 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 ..."
adam added the enhancement label 2026-01-05 14:47:56 +01:00
adam closed this issue 2026-01-05 14:47:56 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Sep 24, 2023):

First implementation video for this feature: https://www.youtube.com/watch?v=yz6M9iQQs-8

@LGUG2Z commented on GitHub (Sep 24, 2023): First implementation video for this feature: https://www.youtube.com/watch?v=yz6M9iQQs-8
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#52