Skip to content
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

Add window edge snapping setting #949

Merged
merged 4 commits into from
Feb 14, 2025
Merged

Conversation

Koranir
Copy link
Contributor

@Koranir Koranir commented Feb 6, 2025

Relies on pop-os/cosmic-comp#1189

Creates a new section in the "Window Managment" page called "Floating Layout", which has the "Window snap-to-edge threshold setting" that defaults to 0 (no edge snapping).

Adds a "Floating windows gravitate to nearby edges" toggle in the "Window Managment" page that sets the edge_snap_threshold cosmic-comp configuration to 10 pixels if enabled, or 0 pixels (off) if disabled.

@Drakulix
Copy link
Member

Drakulix commented Feb 7, 2025

(@pop-os/ux please confirm, if I paraphrase this correctly.)

I think we just want this setting to be a toggle. It should display being "on" on any positive value (we want to allow people to mess with the config file) and "off" for '<= 0', toggling on should set the value to 10 and off to 0.

As a description we want "Display edge gravity for floating windows" instead of "Window snap-to-edge threshold". (@pop-os/ux Maybe the "for floating windows" part is redundant given this is in the "Floating Layout" section?)

@maria-komarova
Copy link

I'd rather avoid creating a separate section called Floating Layout since Floating windows is default for any system and people don't really use this term all that often. So let's place the list item under Super key action.
Window Management (2)

@Koranir
Copy link
Contributor Author

Koranir commented Feb 14, 2025

I've taken the liberty of naming the setting "Floating windows gravitate to nearby edges", which I think represents what it does much better than "Display edge gravity for floating windows" - let me know if I have to change it back.
image

Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code wise this looks good!

@Drakulix Drakulix requested a review from a team February 14, 2025 10:57
@mmstick mmstick merged commit 8f9f287 into pop-os:master Feb 14, 2025
3 checks passed
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.

4 participants