Skip to content

Adaptive corner/edge snap #323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: v16.4
Choose a base branch
from

Conversation

Gregorein
Copy link

Hey @domferr! I've implemented my own feature request: #321, hope it's good :)

image

feat: implement edge snap mode settings and behavior

  • Added new setting for edge snap mode in the schema and preferences.
  • Introduced dropdown for selecting edge snap behavior: default, adaptive, and granular.
  • Updated EdgeTilingManager to handle different snapping modes based on user selection.
  • Enhanced layout management to support intelligent edge snapping based on the current layout.

It's a simple dropdown with 3 options:

  • default is the currently implemented behaviour - corners snap windows to display quarters, edges snap windows to halves
  • adaptive - corners snap windows to the closes tile to the activated corner, edges snap windows to the 'column of tiles' closes to the side.
  • granular - corners snap windows to closest corner tile, edges are 'segmented' the way layout is, so if your left-most column has 4-5 rows, each will be snappable.

I also modified how 'after-snap layout' is rendered, now it follows the current layout tiling.

domferr and others added 2 commits April 22, 2025 22:13
- Added new setting for edge snap mode in the schema and preferences.
- Introduced dropdown for selecting edge snap behavior: default, adaptive, and granular.
- Updated EdgeTilingManager to handle different snapping modes based on user selection.
- Enhanced layout management to support intelligent edge snapping based on the current layout.
@Gregorein
Copy link
Author

now that I think, the adaptive option could be removed and the Span multiple tiles key could be used to trigger "snap window to left-most column of tiles". What do you think?

@domferr
Copy link
Owner

domferr commented Apr 27, 2025

Hey @Gregorein thank you for your contribution! The adaptive one, meaning tiling to the available space instead of a fixed half/quarter tile is a must have. If I remember correctly, there are many people willing this feature. So, in general, they want to move the window to the side and tile the window to the whole available space near to that side. Same applies when they move the window to the corner (according to the quarter tiling activation area setting), they want to tile that window to a quarter of the screen and filling up all the available space. The wording adaptive is a little bit difficult to understand, and indeed I see you had to add a description to the dropdown entry.

Same applies to granular: if I understood correctly that setting allows to tile according to the selected layout instead of the fixed quarter tiling.

So, I propose to rename the mode names to be clearer and more intuitive, so users immediately understand them without needing extra explanation, in the following way:

  • Default -> Fixed quarters layout
  • Adaptive -> Fill available space
  • Granular -> Follow currently selected layout

Meanwhile, I'll test your changes against many GNOME shell versions! They seems very solid, well done!

Thanks a million for your contribution, it means a world! ❤️

- Changed edge snap mode descriptions to more accurately reflect functionality
@Gregorein
Copy link
Author

The descriptions were tricky to keep short and informative :D Yes, you understand behaviours correctly:

  • Default - current behaviour. Corners snap to display quarters, edges snap to display halves
  • Adaptive - corners snap to closest corner tile of the layout, edges snap to the side-most column of tiles.
  • Granular - snap to layout tile that's nearest to the cursor, so instead of a full column you can have a small window (triple column stack etc)

UX-wise I think there could be some segmented-button picker with svg icons to better suggest (a rough mock of the idea):
tilingshell mock

Other than that - awesome extension! I've updated the dropdown labels :)

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.

2 participants