We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6e1754 commit 97ecbf1Copy full SHA for 97ecbf1
src/main.py
@@ -147,11 +147,13 @@ def find_matching_profile(window: Window) -> Optional[dict]:
147
exe = apply_to.get('executable', '') or None
148
if not name and not exe:
149
continue
150
- score = (
151
- match(name, window.name)
152
- + match(exe, window.executable)
153
- )
154
- matches.append((score, profile))
+ score = 0
+ if name:
+ score += match(name, window.name)
+ if exe:
+ score += match(exe, window.executable)
155
+ if score:
156
+ matches.append((score, profile))
157
if not matches:
158
return None
159
return sorted(matches, key=lambda x: x[0])[0][1]
0 commit comments