add edge_resistance seat option for sticky monitor borders - #9201
Open
layus wants to merge 1 commit into
Open
Conversation
Add a `seat <name> edge_resistance <px>` option that holds the cursor at a shared output boundary until it has been pushed a configurable distance into the next output, making small targets along monitor edges easier to hit. The threshold is measured in layout coordinates so it is scale-independent, is bypassed while a button is held so drags cross freely, and is disabled by default. Documented in sway-input(5).
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.
Hi,
I had this idea for a long time and only recently started implementing it.
My issue was that it is easy to select a window title (top) or click a waybar widget (bottom) on a single screen. But when you have multiple monitors, I always overshoot, used to have the border preventing me from overflowing.
With this resistance option, it takes a configurable amount of extra pixels to switch from one monitor to the next, as if there was a blank space of that amount of pixels between the monitors. The switch only happens when enough virtual pixels have been crossed. And starts at the edge of the next screen, not at the amount of pixels limit.
The patch is pretty small, but lacks tests because I have no idea how to test that. Happy to fix with a hint on where to look.
Happy coding!