Skip to content

add edge_resistance seat option for sticky monitor borders - #9201

Open
layus wants to merge 1 commit into
swaywm:masterfrom
layus:edge-resistance
Open

add edge_resistance seat option for sticky monitor borders#9201
layus wants to merge 1 commit into
swaywm:masterfrom
layus:edge-resistance

Conversation

@layus

@layus layus commented Jun 27, 2026

Copy link
Copy Markdown

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!

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).
@layus layus changed the title input/cursor: add edge_resistance seat option for sticky monitor borders add edge_resistance seat option for sticky monitor borders Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant