Skip to content

fix: polish Wayland gaming shortcuts UI - #29

Merged
LordVicky merged 15 commits into
LordVicky:devfrom
Retr0astic:dev
Jul 18, 2026
Merged

fix: polish Wayland gaming shortcuts UI#29
LordVicky merged 15 commits into
LordVicky:devfrom
Retr0astic:dev

Conversation

@Retr0astic

@Retr0astic Retr0astic commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR adds a configurable Linux DualSense gaming-shortcuts layer to the companion application, built on the existing controller input, settings, IPC, and notification infrastructure.

Gaming shortcuts

  • Adds PS-button gesture recognition for single press, double press, long press, and PS-plus-button chords.
  • Adds an optional temporary shortcut mode with a timeout, shortcut reference notification, and PS/Circle cancellation.
  • Stores global bindings and per-game overrides, with runtime override selection using the active-game watcher from Trigger Profiles.
  • Supports configurable actions for:
    • opening/focusing OpenDS5
    • launching an application or custom executable
    • volume up/down/mute and microphone mute toggle
    • screenshots
    • screen recording
    • performance HUD toggle
    • on-screen keyboard
    • passthrough and no-op behavior
  • Adds timing controls for double-press, long-press, and chord recognition.
  • Adds success/error notification preferences, action-result notifications, and a notification preview.
  • Adds best-effort Linux environment/provider detection and structured unavailable/failed action results.
  • Validates persisted action types, rejects NUL-containing executable/argument values, and limits executable argument arrays to 64 entries. Actions use argument arrays rather than shell execution.

Controller and runtime integration

  • Adds Linux evdev discovery for the physical DualSense gamepad node while excluding touchpad, sensor, headset, and other sibling nodes.
  • Associates evdev sources with matching HID paths for shortcut-result metadata and lifecycle tracking.
  • Adds DualSense button handling for the PS button, touchpad, mute, L3/R3, and D-pad events.
  • Normalizes hat/D-pad input into controller button events and preserves controller source identity through the input pipeline.
  • Wires the reader, gesture coordinator, action executor, settings store, IPC, preload API, notifications, and application lifecycle together.
  • Cleans up readers, gesture timers, shortcut-mode notifications, and source state during disconnect, reload, and application shutdown.
  • Broadens Linux audio-sink matching with a four-channel “Wireless Controller” fallback heuristic.

Companion UI and settings

  • Adds a Gaming Shortcuts control tab with:
    • enable/disable toggle
    • PS gesture editors
    • direct-chord editor
    • shortcut-mode settings
    • timing and notification controls
    • per-game override editor
    • reset and preset actions
    • controller preview and provider availability status
  • Persists and normalizes gaming-shortcut settings, including malformed persisted actions and bounded executable arguments.
  • Restores stick sample preview forwarding and improves the preview layout for narrow windows.
  • Forces a repaint after native resize on Linux/Wayland to avoid stale transparent regions in frameless windows.
  • Replaces the static controller preview messaging with the new interactive gaming-shortcuts preview.

Development and Nix support

  • Adds tracked Codex planner, implementer, reviewer, and repository-agent configuration.
  • Extends the Nix development shell with the toolchain and Linux utilities needed for companion development and shortcut providers.
  • Adds the OpenDS5 Cachix substituter and trusted key for Nix development/build caching.

Validation

  • GitHub nix-flake check: passed.
  • GitHub release AppImage check: passed.
  • git diff --check upstream/dev...HEAD: passed.
  • cd ds5-bridge/companion && npm run typecheck: passed.
  • cd ds5-bridge/companion && ./node_modules/.bin/vitest run src: passed (57 files, 773 tests).
  • Changed shortcut/evdev/settings/UI tests: passed (15 files, 197 tests).
  • cd ds5-bridge/companion && npm run test:installer: passed (16 checks).

The full native, firmware, and Nix rebuild pipelines were not freshly run locally. Hardware/manual controller validation was not performed.

Known limitations

  • Runtime shortcut input is Linux-only; the settings UI can still be rendered and saved on other platforms.
  • Desktop actions are global. Input-source/HID association is currently used for metadata and lifecycle tracking; it does not suppress an unmatched controller or provide per-controller action isolation.
  • Provider detection is best-effort and depends on external tools such as wpctl, wtype, grim, hyprshot, gpu-screen-recorder, and MangoHud configuration. The four-channel wireless-controller sink fallback may require additional validation when multiple controllers are connected.
  • Queued actions and child processes are not currently cancelled when a controller disconnects or the application shuts down.
  • Per-game override selection depends on Trigger Profiles active-game detection.
  • Steam Input compatibility, native DualSense game compatibility, wired/Bluetooth combinations, multiple-controller routing, desktop-provider behavior, and physical DualSense input remain unverified.

@LordVicky
LordVicky merged commit 11207a7 into LordVicky:dev Jul 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants