Skip to content

Change default gesture swipes to desktop switching#270

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

Change default gesture swipes to desktop switching#270
klovinad wants to merge 3 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

Swaps the default horizontal gesture-swipe actions from browser tab switching (PrevTab / NextTab) to desktop/space switching (PreviousDesktop / NextDesktop) for the GestureButton. All other directions (Up, Down, Click) are untouched.

  • Both Action::PreviousDesktop and Action::NextDesktop are fully defined, categorized, and covered by existing category tests; no new variants were needed.
  • Tests in config.rs that verify gesture defaults do so via default_gesture_binding(dir) comparisons, so they automatically validate the new values without any test changes required.

Confidence Score: 5/5

Safe to merge — this is a two-line default value swap with no logic changes, no new variants, and no migration concerns for existing user configs (users who have already customized their gesture bindings are unaffected; only fresh/default installs change).

The changed function only seeds defaults for first-run or freshly-promoted gesture buttons; existing persisted configs are never overwritten. Both target actions are valid, well-tested enum variants. The indirect test coverage in config.rs automatically validates the new defaults.

No files require special attention.

Important Files Changed

Filename Overview
crates/openlogi-core/src/binding.rs Two-line default change swapping PrevTab/NextTab to PreviousDesktop/NextDesktop in default_gesture_binding; both target actions are valid, tested variants with no other call-sites affected.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    G[GestureButton swipe] --> D{GestureDirection}
    D -->|Up| MC[Action::MissionControl]
    D -->|Down| SD[Action::ShowDesktop]
    D -->|Left| PD["Action::PreviousDesktop (was PrevTab)"]
    D -->|Right| ND["Action::NextDesktop (was NextTab)"]
    D -->|Click| AE[Action::AppExpose]
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{GestureDirection}
    D -->|Up| MC[Action::MissionControl]
    D -->|Down| SD[Action::ShowDesktop]
    D -->|Left| PD["Action::PreviousDesktop (was PrevTab)"]
    D -->|Right| ND["Action::NextDesktop (was NextTab)"]
    D -->|Click| AE[Action::AppExpose]
Loading

Reviews (3): 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