Skip to content

Support matching bundle-less processes by executable name in the app picker - #1369

Merged
lujjjh merged 4 commits into
linearmouse:mainfrom
Outfire:feature/executable-name-app-matching
Sep 14, 2026
Merged

lujjjh merged 4 commits into
linearmouse:mainfrom
Outfire:feature/executable-name-app-matching

Conversation

@Outfire

@Outfire Outfire commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Hi! A short intro on how I ended up here. I use LinearMouse daily, but I have zero Swift experience so all changes made by Claude. Recently I started running a Windows applications through CrossOver (Wine) on my Mac and wanted per-app settings for it and found there was no way to configure them from the GUI at all.

Summary

Wine/CrossOver/Whisky processes have no bundle identifier, so they never show up in the app picker. "Other Executable…" does not help either: Wine copies the loader into a per-launch temporary directory (/var/folders/…/winetemp-/Some.exe), so an exact path stops matching on the next launch.

Wine/CrossOver applications and other bundle-less processes have no bundle identifier, and their executable path points into a per-launch temporary directory, so neither existing app picker option can target them. The matching engine already supports if.processName; this exposes it in the GUI:

  • Running bundle-less processes are listed in the app picker by executable name, alongside running apps.
  • Schemes configured with if.processName appear in the Configured section and survive GUI edits.

Covered by a scheme-index test asserting processName schemes are found without cross-matching app or processPath conditions.

…picker

Wine/CrossOver applications and other bundle-less processes have no bundle
identifier, and their executable path points into a per-launch temporary
directory, so neither existing app picker option can target them. The
matching engine already supports if.processName; this exposes it in the
GUI:

- Running bundle-less processes are listed in the app picker by
  executable name, alongside running apps.
- Schemes configured with if.processName appear in the Configured
  section and survive GUI edits.

Covered by a scheme-index test asserting processName schemes are found
without cross-matching app or processPath conditions.
…arning

The scheme-index test listed the device-only scheme first, so the lookup
without app conditions found it at index 0 whether or not the exact
match compared processName. Put the device-only scheme last so that
lookup has to skip the processName and processPath schemes, assert the
concrete insertion index for an unknown name, and add a case where a
processName scheme is the only candidate and must yield an insertion
index rather than a match. With processName removed from the exact
match, three assertions fail.

Make SchemeIndex Equatable so each lookup is a single XCTAssertEqual
instead of a guard-case block.

Build configuredExecutableNameSet with compactMap instead of reduce,
which removes the reduce_into SwiftLint warning the new code added.
lujjjh pushed a commit that referenced this pull request Sep 7, 2026
…ntact (#1370)

This is the follow-up fix. Similar situation to
[#1369](#1369).
In this case CrossOver + MX Master 4. Side wheel remapped to keyboard
buttons F1/F2. If hold RBM and spin side wheel for triggering F1/F2, RBM
still in hold state but no action until release and press it again.

Summary

Key events created without an event source carry no HID system state, a
zero timestamp and no keyboard type. Some event consumers treat such
events as foreign and mistrack input state around them - e.g. Wine
applications drop a held-button mouse capture when a key press arrives,
and Wine's modifier tracking leaves Control stuck after a space-switch
symbolic hotkey (Control+Arrow) fires mid focus change, turning later
game input into Control-modified keys. Create simulated events (both
KeySimulator key presses and symbolic hotkey sequences) from a
hidSystemState source and stamp a real timestamp and keyboard type so
they are indistinguishable from hardware key presses.

Covered by a KeySimulator test recording posted events and asserting the
HID system state, timestamp and keyboard type fields.
The status item's "Configure for <app>" action fell back to "All Apps"
when the frontmost application had no bundle identifier. Use its
executable name instead, matching the app picker's processName support.
@lujjjh lujjjh added the enhancement New feature or request label Sep 14, 2026
@lujjjh

lujjjh commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@lujjjh
lujjjh merged commit fb7ac2e into linearmouse:main Sep 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants