Skip to content

feat: add a GNOME Overview button action - #648

Open
jannikdonker wants to merge 4 commits into
AprilNEA:masterfrom
jannikdonker:feat/gnome-overview-action
Open

feat: add a GNOME Overview button action#648
jannikdonker wants to merge 4 commits into
AprilNEA:masterfrom
jannikdonker:feat/gnome-overview-action

Conversation

@jannikdonker

Copy link
Copy Markdown

Summary

Adds a new button/gesture action, "GNOME Overview," that opens the GNOME
Shell Activities Overview — a natural fit for the MX Master 3/3S gesture
button. Linux/GNOME-real; a debug-logged no-op on macOS/Windows, and hidden
from every picker unless the session actually reports GNOME.

Changes

  • openlogi-core: new Action::GnomeOverview / NativeAction::GnomeOverview
    variant, appended per the append-only stability contract; reuses the
    existing Grid icon so no ActionRingIcon change (and therefore no IPC
    PROTOCOL_VERSION bump) is needed.
  • openlogi-inject: Linux taps the bare Super key via uinput
    (press_key(&[], KEY_LEFTMETA)), relying on GNOME Shell's default
    overlay-key behavior — the same primitive already used for LockScreen's
    Super+L fallback. macOS/Windows debug-log a no-op, matching the existing
    precedent for actions with no cross-platform equivalent.
  • openlogi-gui: wires the new action into the button picker, gesture
    flyout, keyboard function-row picker, and Actions Ring editor (all share
    the same catalog helpers). Adds a new action_visibility module that
    hides GnomeOverview from all of those catalogs unless
    $XDG_CURRENT_DESKTOP reports a GNOME session — the same variable
    .desktop entries use for OnlyShowIn=GNOME;. An already-persisted
    binding keeps working even when hidden from the picker.
  • i18n: adds the "GNOME Overview" key to all 20 locale files; zh-CN
    gets a real translation ("GNOME 概览") since that locale is exhaustively
    checked against the full action catalog.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • cargo test -p openlogi-gui i18n (locale parity + zh-CN coverage)
  • cargo test -p openlogi-ipc --test wire_format (confirms no wire-format
    change — Action/NativeAction aren't part of the IPC contract)
  • RUSTDOCFLAGS="-D warnings" cargo doc -p openlogi-hid -p openlogi-hidpp -p openlogi-hidpp-derive --no-deps --document-private-items
  • Not runtime-tested on a live GNOME session (no GNOME desktop available in
    this environment) — the Super-key-tap mechanism and the picker's
    GNOME-only gating should be sanity-checked on real hardware/session before
    merge.

New Action variant for opening the GNOME Shell Activities Overview,
pickable for any button (in particular the MX Master 3/3S gesture
button). Appended at the end of the enum and the catalog table's
Navigation section per the append-only stability contract; reuses the
existing Grid icon so no new ActionRingIcon variant (and therefore no
IPC PROTOCOL_VERSION bump) is needed.

Adds a matching NativeAction::GnomeOverview and Action::effect() arm
so openlogi-inject's per-platform backends are forced by the
exhaustive match to handle it explicitly.

Updates the persisted_action_variant_names_are_stable golden test,
which pins the exact set of on-disk config.toml variant names.
Linux: GnomeOverview presses KEY_LEFTMETA with no modifiers, relying
on GNOME Shell's default overlay-key behavior (tapping Super alone
toggles the Activities Overview). Reuses the existing press_key
helper and KEY_LEFTMETA capability already registered for
LockScreen's Super+L fallback.

No org.gnome.Shell D-Bus Eval call is used: it's disabled by default
on stock GNOME (documented precedent in openlogi-hook's frontmost-
window code), so it would silently fail for most users.

macOS and Windows have no Activities Overview equivalent, so both
debug-log a no-op, mirroring how Linux already no-ops macOS-only
actions like MissionControl/AppExpose/ShowDesktop/LaunchpadShow.

Adds GnomeOverview to the inject_action example's usage listings.
Adds the picker icon arm for GnomeOverview (reuses the existing
layout-grid glyph shared with MissionControl/ShowActionsRing) so the
button picker, gesture flyout, keyboard function-row picker, and
Actions Ring editor all render it via the catalog helpers they
already share.

Also adds a new action_visibility module that hides GnomeOverview
from every one of those catalogs unless $XDG_CURRENT_DESKTOP reports
a GNOME session — the same variable .desktop entries use for
OnlyShowIn=GNOME; filtering. openlogi-core's Action::catalog()
deliberately stays platform/IO-free, so this filter lives in the GUI
layer instead of the core catalog.

An already-persisted GnomeOverview binding is unaffected by the
gate: it keeps rendering its label and keeps firing normally, it
just can't be picked again from a catalog that's hiding it.
Adds "GNOME Overview" to all 20 locale catalogs, same position in
each (right after "Launchpad"), satisfying the key-parity test.

zh-CN gets a real translation ("GNOME 概览") rather than an English
placeholder: the zh-CN locale is exhaustively checked against every
Action::catalog() entry in i18n.rs's locale_file_resolves_keys test,
which requires an actual (non-English-identical) value. The other 19
files use the English string as a placeholder per the i18n rules;
Crowdin fills in real translations later.
@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown

Greptile Summary

Adds a GNOME-specific Overview action that injects a bare Super-key tap on Linux and remains a logged no-op elsewhere.

  • Extends the persisted action and native-effect catalogs without changing existing variant names.
  • Filters the action from GUI pickers unless the Linux session reports GNOME.
  • Wires the action into button, gesture, keyboard, and Actions Ring catalogs.
  • Adds the action label across all locale files and platform dispatch matches.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or independently actionable issues identified.

The new action is appended compatibly, reaches exhaustive platform dispatch paths, emits a valid declared Super-key sequence on Linux, and is consistently filtered from unsupported GUI catalogs.

Important Files Changed

Filename Overview
crates/openlogi-gui/src/action_visibility.rs Introduces centralized, tested GNOME-session gating for newly offered action choices while leaving persisted bindings intact.
crates/openlogi-gui/src/mouse_model/picker.rs Applies host visibility filtering to shared button and gesture catalogs and adds the Overview icon mapping.
crates/openlogi-gui/src/components/action_ring_panel/editor.rs Applies the same host visibility policy to Actions Ring choices.
crates/openlogi-core/src/binding/action.rs Appends the persisted GnomeOverview action and includes it in the shared catalog.
crates/openlogi-core/src/binding/effect.rs Maps the new persisted action to its corresponding native effect.
crates/openlogi-inject/src/inject/linux.rs Implements Overview activation as a complete bare-Super key tap using an already-declared uinput capability.
crates/openlogi-inject/src/inject/macos.rs Handles the GNOME-specific action as an intentional debug-logged no-op.
crates/openlogi-inject/src/inject/windows.rs Handles the GNOME-specific action as an intentional debug-logged no-op.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[GNOME session detected] --> B[Overview offered in GUI catalogs]
  B --> C[Persisted Action::GnomeOverview]
  C --> D[NativeAction::GnomeOverview]
  D --> E[Linux uinput]
  E --> F[Bare Super press and release]
  F --> G[GNOME Activities Overview]
  H[Non-GNOME session] --> I[Action hidden from new choices]
  J[macOS or Windows execution] --> K[Debug-logged no-op]
Loading

Reviews (1): Last reviewed commit: "feat(i18n): add GNOME Overview translati..." | Re-trigger Greptile

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.

1 participant