feat: add a GNOME Overview button action - #648
Open
jannikdonker wants to merge 4 commits into
Open
Conversation
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 SummaryAdds a GNOME-specific Overview action that injects a bare Super-key tap on Linux and remains a logged no-op elsewhere.
Confidence Score: 5/5The 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.
|
| 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]
Reviews (1): Last reviewed commit: "feat(i18n): add GNOME Overview translati..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Action::GnomeOverview/NativeAction::GnomeOverviewvariant, appended per the append-only stability contract; reuses the
existing
Gridicon so noActionRingIconchange (and therefore no IPCPROTOCOL_VERSIONbump) is needed.(
press_key(&[], KEY_LEFTMETA)), relying on GNOME Shell's defaultoverlay-key behavior — the same primitive already used for
LockScreen'sSuper+L fallback. macOS/Windows debug-log a no-op, matching the existing
precedent for actions with no cross-platform equivalent.
flyout, keyboard function-row picker, and Actions Ring editor (all share
the same catalog helpers). Adds a new
action_visibilitymodule thathides
GnomeOverviewfrom all of those catalogs unless$XDG_CURRENT_DESKTOPreports a GNOME session — the same variable.desktopentries use forOnlyShowIn=GNOME;. An already-persistedbinding keeps working even when hidden from the picker.
"GNOME Overview"key to all 20 locale files;zh-CNgets a real translation ("GNOME 概览") since that locale is exhaustively
checked against the full action catalog.
Testing
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspacecargo test -p openlogi-gui i18n(locale parity + zh-CN coverage)cargo test -p openlogi-ipc --test wire_format(confirms no wire-formatchange —
Action/NativeActionaren'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-itemsthis environment) — the Super-key-tap mechanism and the picker's
GNOME-only gating should be sanity-checked on real hardware/session before
merge.