Skip to content

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

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

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

Conversation

@rodrigoluizs
Copy link
Contributor

@rodrigoluizs rodrigoluizs commented Mar 16, 2026

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