I am trying to make "float everything except when the title startswith FreeCAD" work.
Matching strategy "DoesNotStartWith" does not exist, so I tried Regex. However it seems that the floating_identifiers are run globally, and not in the context of the application? So the regex that I tried seems to make everything floating? (I am not sure however, it also seems like Komorebi is not running properly when adding the regex)
Is there a solution to make al popups floating without manually adding all titles?
Originally created by @RaymondKroon on GitHub (Mar 20, 2024).
I tried to make all popups float for FreeCAD, however the only solution I see is adding all titles, which kinda sucks.
The popups have the same Class and same EXE:
```
{
"windows": {
"elements": [
{
"hwnd": 11736712,
"title": "Insert length", <-- POPUP
"exe": "FreeCAD.exe",
"class": "Qt5152QWindowIcon",
"rect": {
"left": 1916,
"top": 3,
"right": 1928,
"bottom": 786
}
}
],
"focused": 0
}
},
{
"windows": {
"elements": [
{
"hwnd": 19140776,
"title": "FreeCAD 0.21.2", <- MAIN WINDOW
"exe": "FreeCAD.exe",
"class": "Qt5152QWindowIcon",
"rect": {
"left": 1916,
"top": 788,
"right": 1928,
"bottom": 786
}
}
],
"focused": 0
}
}
```
I am trying to make "float everything except when the title startswith FreeCAD" work.
Matching strategy "DoesNotStartWith" does not exist, so I tried Regex. However it seems that the floating_identifiers are run globally, and not in the context of the application? So the regex that I tried seems to make everything floating? (I am not sure however, it also seems like Komorebi is not running properly when adding the regex)
```
- name: FreeCAD
identifier:
kind: Exe
id: FreeCAD.exe
matching_strategy: Equals
options: []
float_identifiers:
- kind: Title
id: ^([^F].*)$
matching_strategy: Regex
```
Is there a solution to make al popups floating without manually adding all titles?
I'll be working on composite rules and negative matchers to address extreme edge cases like this in the next release 🤞
@LGUG2Z commented on GitHub (Mar 20, 2024):
I'll be working on composite rules and negative matchers to address extreme edge cases like this in the next release 🤞
This initial config format is subject to change before the next release, but you can try it now if you build from the linked commit
"float_rules":[{"kind":"Title","id":"Media Player","matching_strategy":"Equals"},[{"kind":"Exe","id":"firefox.exe","matching_strategy":"Equals"},{"kind":"Title","id":"Determining if a Rust Vector","matching_strategy":"StartsWith"}]],
the float_rules key can now take a {} rule object or a [] list of rule objects. With lists of rule objects (ie. composite rules), every single rule in the list must evaluate to true in order for the window to be floated; if any one of the rules in the list fails, the rule will not be applied.
@LGUG2Z commented on GitHub (Mar 20, 2024):
Initial testable outline of composite rules here: https://github.com/LGUG2Z/komorebi/commit/6cf99a3578f0fa0db3dad8ed7aaca20c59f73926
This initial config format is subject to change before the next release, but you can try it now if you build from the linked commit
```json
"float_rules": [
{
"kind": "Title",
"id": "Media Player",
"matching_strategy": "Equals"
},
[
{
"kind": "Exe",
"id": "firefox.exe",
"matching_strategy": "Equals"
},
{
"kind": "Title",
"id": "Determining if a Rust Vector",
"matching_strategy": "StartsWith"
}
]
],
```
the `float_rules` key can now take a `{}` rule object or a `[]` list of rule objects. With lists of rule objects (ie. composite rules), every single rule in the list must evaluate to true in order for the window to be floated; if any one of the rules in the list fails, the rule will not be applied.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @RaymondKroon on GitHub (Mar 20, 2024).
I tried to make all popups float for FreeCAD, however the only solution I see is adding all titles, which kinda sucks.
The popups have the same Class and same EXE:
I am trying to make "float everything except when the title startswith FreeCAD" work.
Matching strategy "DoesNotStartWith" does not exist, so I tried Regex. However it seems that the floating_identifiers are run globally, and not in the context of the application? So the regex that I tried seems to make everything floating? (I am not sure however, it also seems like Komorebi is not running properly when adding the regex)
Is there a solution to make al popups floating without manually adding all titles?
@LGUG2Z commented on GitHub (Mar 20, 2024):
I'll be working on composite rules and negative matchers to address extreme edge cases like this in the next release 🤞
@LGUG2Z commented on GitHub (Mar 20, 2024):
Initial testable outline of composite rules here: https://github.com/LGUG2Z/komorebi/commit/6cf99a3578f0fa0db3dad8ed7aaca20c59f73926
This initial config format is subject to change before the next release, but you can try it now if you build from the linked commit
the
float_ruleskey can now take a{}rule object or a[]list of rule objects. With lists of rule objects (ie. composite rules), every single rule in the list must evaluate to true in order for the window to be floated; if any one of the rules in the list fails, the rule will not be applied.@RaymondKroon commented on GitHub (Mar 22, 2024):
Nice! I am running the testable version, and it works great.
@LGUG2Z commented on GitHub (Mar 23, 2024):
@RaymondKroon https://github.com/LGUG2Z/komorebi/commit/e0652d953a3c7028f09b676fab4d880e4bab5854 negative matching strategies added here