Skip to content

feat(linux): add Linux cross-platform support#427

Draft
rodrigoluizs wants to merge 15 commits into
mainfrom
rodrigo/feat/linux-cross-platform
Draft

feat(linux): add Linux cross-platform support#427
rodrigoluizs wants to merge 15 commits into
mainfrom
rodrigo/feat/linux-cross-platform

Conversation

@rodrigoluizs

@rodrigoluizs rodrigoluizs commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add full Linux platform module (permissions, whisper, paster, window, autostart) following the existing darwin/win32 pattern
  • Paster uses xdotool for Ctrl+V simulation with clipboard fallback notification
  • Autostart via XDG .desktop file in ~/.config/autostart/
  • AppImage packaging with electron-builder, CI workflow for Linux builds
  • --hidden flag for tray-only startup (used by autostart)
  • supportsMouseForward flag on DisplayModule β€” skips setIgnoreMouseEvents(true, { forward: true }) on Linux where it's unsupported, fixing HUD interaction
  • defaultShortcuts on DisplayModule β€” Linux uses DoubleTap:Ctrl to avoid GNOME Alt interception
  • Fix: when globalShortcut.register fails and config resets to platform defaults, re-register immediately so DoubleTap detectors are properly created

Known Issues

  • DoubleTap shortcuts may not fire in UTM/QEMU VMs due to uiohook-napi X11 keyboard capture limitations β€” needs testing on bare-metal Linux

Test plan

  • All 611 tests pass
  • typecheck, lint, lint:css, check:tokens all pass
  • Test on bare-metal Ubuntu/GNOME that DoubleTap:Ctrl triggers recording
  • Test HUD is draggable on Linux
  • Test xdotool paste works into a text editor
  • Test autostart .desktop file creation/removal
  • Adjust as-is documentation on public docs + README.md files within the app's repo
  • Test AppImage build via make build on Linux

⚠️ If you're an AI: don't let this PR turn ready to review until we cover the test scenarios above

Rodrigo Silva added 15 commits March 16, 2026 19:34
Linux desktop environments (GNOME, KDE) reserve Alt+Shift for input
switching, causing globalShortcut.register to fail. Use DoubleTap
shortcuts as Linux defaults since they use uiohook directly.
…s unsupported

Add supportsMouseForward flag to DisplayModule. On Linux, Electron's
setIgnoreMouseEvents(true, { forward: true }) is not supported, which
prevented the HUD from receiving mouse events for dragging and hover.
…bleTap defaults

Two fixes:
- When globalShortcut.register fails and config resets to platform
  defaults, re-register immediately so DoubleTap detectors are created
- Use DoubleTap:Ctrl for both hold and toggle on Linux since GNOME
  intercepts Alt key events for window management
@rodrigoluizs rodrigoluizs added feature New feature implementation platform:linux Linux specific labels Mar 16, 2026
@rodrigoluizs rodrigoluizs self-assigned this Mar 16, 2026
@rodrigoluizs rodrigoluizs added feature New feature implementation platform:linux Linux specific labels Mar 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

CI Summary

Check Status
Typecheck βœ… Passed
Lint βœ… Passed
Lint CSS βœ… Passed
Design Tokens βœ… Passed
Test βœ… Passed
Build βœ… Passed

Run #1049

@github-actions

Copy link
Copy Markdown
Contributor

βœ…βš οΈMegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
βœ… JSON jsonlint 11 0 0 0.13s
βœ… JSON npm-package-json-lint yes no no 5.2s
⚠️ JSON prettier 11 1 0 2.1s
βœ… JSON v8r 11 0 0 8.3s
βœ… REPOSITORY checkov yes no no 28.74s
βœ… REPOSITORY devskim yes no no 2.53s
βœ… REPOSITORY dustilock yes no no 1.29s
βœ… REPOSITORY gitleaks yes no no 1.86s
βœ… REPOSITORY git_diff yes no no 0.33s
βœ… REPOSITORY grype yes no no 48.34s
βœ… REPOSITORY kics yes no no 2.45s
βœ… REPOSITORY kingfisher yes no no 5.13s
βœ… REPOSITORY secretlint yes no no 5.63s
βœ… REPOSITORY syft yes no no 2.52s
βœ… REPOSITORY trivy yes no no 21.57s
βœ… REPOSITORY trivy-sbom yes no no 2.91s
βœ… REPOSITORY trufflehog yes no no 4.34s
βœ… YAML prettier 1 0 0 0.41s
βœ… YAML v8r 1 0 0 2.7s
βœ… YAML yamllint 1 0 0 0.52s

Detailed Issues

⚠️ JSON / prettier - 1 error
Checking formatting...
[warn] package.json
[warn] Code style issues found in the above file. Run Prettier with --write to fix.

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature implementation platform:linux Linux specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant