mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[PR #1403] [MERGED] feat(bar): send commands by mouse/touchpad/screen #1385
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/1403
Author: @CtByte
Created: 4/4/2025
Status: ✅ Merged
Merged: 5/11/2025
Merged by: @LGUG2Z
Base:
master← Head:bar_mouse_scrolling📝 Commits (1)
aaf90a2feat(bar): send commands by mouse/touchpad/screen📊 Changes
8 files changed (+55045 additions, -10 deletions)
View changed files
📝
Cargo.lock(+1 -0)📝
Cargo.toml(+1 -0)📝
komorebi-bar/Cargo.toml(+1 -0)📝
komorebi-bar/src/bar.rs(+251 -7)📝
komorebi-bar/src/config.rs(+146 -0)📝
komorebi/Cargo.toml(+1 -1)📝
komorebi/src/core/pathext.rs(+2 -2)📝
schema.bar.json(+54642 -0)📄 Description
This commit makes it possible to send commands from the bar by using the
mouse/touchpad/touchscreen.
Komorebi or custom commands can be sent by clicking on the
mouse's primary, secondary, middle, back or forward buttons.
As the primary single click is already used by widgets, only primary double clicks can
send commands. This limitation is due to Egui also triggering 2 single clicks
before a double click is triggered. Egui does not have an
implementation for stopping event propagation out of the box and would
be too much work to include.
Similarly, commands can be sent on every "tick" of mouse scrolling, touchpad or
touchscreen swiping in any of the 4 directions. This "tick" can be
adjusted to fit user's preference.
This is due to the fact, that Egui does not have an event for when a mouse "tick" occurs. It instead
gives a number of points that the user scrolled/swiped on each frame.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.