Add BindingKind enum, migrate legacy mouse gesture bindings, and update UI#772
Merged
multiplex55 merged 1 commit intomasterfrom Jan 31, 2026
Merged
Conversation
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.
Motivation
use_queryflag.use_query/actionformats to the appropriate newBindingKind.Description
BindingKindenum tosrc/mouse_gestures/db.rswith variantsExecute,SetQuery,SetQueryAndShow, andToggleLauncher, and setSCHEMA_VERSIONto2with aLEGACY_SCHEMA_VERSION = 1fallback.BindingEntrywithkind: BindingKindand addedaction_string(),display_target()and updatedto_action()to emit the correctAction(e.g.,query:prefix,launcher:show,launcher:toggle) depending onBindingKind.load_gesturesto accept legacy schema v1 JSON and map legacyLegacyBindingEntry(includinguse_queryandlauncher:toggle) to the newBindingKindand fields.display_target()so searches and labels reflect the effective binding target.src/gui/mouse_gestures_dialog.rsto present a radio/segmented control for bindingType, show only the relevant fields per kind, and populate the editor when picking actions/queries from plugins or the app list.src/gui/mod.rsto handlelauncher:showactions that carry a query inargsand ensure focus behavior is applied correctly when those actions come from gestures.BindingKindusage and migration behavior intests/mouse_gestures_db.rs, and updated references intests/mouse_gestures_ui.rsandtests/mouse_gestures_service.rs.Testing
cargo fmtto format code and ensure style consistency (succeeded).cargo testincluding the updated mouse gesture tests, but the build failed during compilation due to a missing native system dependency required byalsa-sys(pkg-config/alsa.pcnot found), so automated tests could not complete in this environment.gesture_db_migrates_legacy_schema(legacy v1 -> v2 migration),set_query_binding_avoids_execute_action(verifiesSetQueryproduces aquery:action and does not invoke execute-action hooks), and updates to existing mouse gesture unit tests to includeBindingKindin fixtures.Codex Task