Skip to content

Change default gesture swipes to desktop switching#270

Open
klovinad wants to merge 2 commits into
AprilNEA:masterfrom
klovinad:proposal/default-desktop-gesture-remap
Open

Change default gesture swipes to desktop switching#270
klovinad wants to merge 2 commits into
AprilNEA:masterfrom
klovinad:proposal/default-desktop-gesture-remap

Conversation

@klovinad

@klovinad klovinad commented Jun 15, 2026

Copy link
Copy Markdown

Summary

Split out from #94 as requested.

This PR changes the default horizontal gesture-button swipes from browser tab switching to desktop/space switching:

  • Left swipe → Previous Desktop
  • Right swipe → Next Desktop

Why

AprilNEA asked to keep this UX decision separate from the wheel-scroll settings work, so each change can be reviewed and reverted independently.

The wheel-scroll settings remain in #94. This PR contains only the default gesture remap.

Verification

  • cargo fmt --all
  • git diff --check

cargo test -p openlogi-core default_gesture_binding --lib was attempted locally, but dependency fetching hung while updating git dependencies before compilation.

@greptile-apps

greptile-apps Bot commented Jun 15, 2026

Copy link
Copy Markdown

Greptile Summary

Remaps the two horizontal gesture-button swipe defaults: Left now fires Action::PreviousDesktop and Right fires Action::NextDesktop, replacing the previous Action::PrevTab / Action::NextTab defaults. Both variants are already defined in the Action enum, their display strings and categories are correct, and the rest of the gesture direction map (Up → MissionControl, Down → ShowDesktop, Click → AppExpose) is untouched.

  • Single two-line change inside default_gesture_binding; no schema, serialization, or migration impact.
  • No dedicated unit test exists for default_gesture_binding (the author noted the test run hung due to dependency fetching); adding a lightweight assertion test would lock in this UX decision and guard against future regressions.

Confidence Score: 5/5

Safe to merge — the change is confined to two lines of a default-value function and uses existing, well-typed enum variants.

Both Action::PreviousDesktop and Action::NextDesktop are fully defined in the enum with correct display strings, categories, and catalog entries. The change only affects the seed values shown on first run; any existing saved config is unaffected. No migration, schema, or serialization logic is touched.

No files require special attention.

Important Files Changed

Filename Overview
crates/openlogi-core/src/binding.rs Swaps the default Left/Right gesture-button actions from PrevTab/NextTab to PreviousDesktop/NextDesktop in default_gesture_binding; both variant names already exist in the Action enum and are correctly categorized.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    G[GestureButton swipe] --> D{direction}
    D -- Up --> MC[Action::MissionControl]
    D -- Down --> SD[Action::ShowDesktop]
    D -- Left --> PD["Action::PreviousDesktop ✱ changed"]
    D -- Right --> ND["Action::NextDesktop ✱ changed"]
    D -- Click --> AE[Action::AppExpose]

    style PD fill:#d4edda,stroke:#28a745
    style ND fill:#d4edda,stroke:#28a745
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    G[GestureButton swipe] --> D{direction}
    D -- Up --> MC[Action::MissionControl]
    D -- Down --> SD[Action::ShowDesktop]
    D -- Left --> PD["Action::PreviousDesktop ✱ changed"]
    D -- Right --> ND["Action::NextDesktop ✱ changed"]
    D -- Click --> AE[Action::AppExpose]

    style PD fill:#d4edda,stroke:#28a745
    style ND fill:#d4edda,stroke:#28a745
Loading

Reviews (2): Last reviewed commit: "Merge branch 'master' into proposal/defa..." | 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