GnomeSnapExtensions / gSnap

Gnome-shell extension that allows you to move windows into specific regions similiar to FancyZones on windows.
https://extensions.gnome.org/extension/4442/gsnap/
Other
166 stars 23 forks source link

Allow spanning of multiple zones by holding ALT key #61

Closed domferr closed 1 year ago

domferr commented 1 year ago

By holding the ALT key, windows are allowed to span on multiple zones. The zones selected are highlighted in green. The whole feature can be enabled/disabled in the settings. The following is an overview of the feature:

https://user-images.githubusercontent.com/14203981/236666596-b65867a2-688b-45ac-a0c4-6968b952efb8.mp4

The following is a playground I used for testing. It also shows the behaviour when the Hold CTRL to snap windows setting is enabled:

https://user-images.githubusercontent.com/14203981/236666712-4575e620-07c1-4132-bc90-17a4e275b905.mp4

The following is the behaviour when the Hold CTRL to snap windows setting is not enabled:

https://user-images.githubusercontent.com/14203981/236666893-8100fd63-531d-4a6d-a7be-53fc2975ac5c.mp4

Notes:

Tested on Ubuntu 23.04, GNOME 44, with both Wayland and Xorg.

meronz commented 1 year ago

This is a big pr, I'll try to make time for reviewing it but I'm currently very busy so I cannot give you an estimate on that.

Thanks a lot for opening this and implementing such a useful feature!

meronz commented 1 year ago

I tested it and I must say, I like that you chose to implement it by holding a key instead of "dropping" the window in the line between two zones. I only have one minor pet peeve: we should make it evident that this feature is mutually-exclusive with the show-tabs option. I'd suggest two changes to achieve this:

Do you think you can do that?

Again, thanks for this very important feature!

domferr commented 1 year ago

I tested it and I must say, I like that you chose to implement it by holding a key instead of "dropping" the window in the line between two zones. I only have one minor pet peeve: we should make it evident that this feature is mutually-exclusive with the show-tabs option. I'd suggest two changes to achieve this:

* Disable one checkbox in `prefs_builder.ts` if the other one is active.

* Add a text description underneath the `SPAN_MULTIPLE_ZONES` checkbox, something along the lines of _"This feature does not work if you have the "Show tabs" feature enabled"_.

Do you think you can do that?

Again, thanks for this very important feature!

Sorry for the late reply. I agree with you that the changes you proposed are needed. I pushed them! I added also the label "This feature is not supported if you have the "Hold ALT to span multiple zones" feature enabled" below the "Show tabs" checkbox otherwise it is not clear why the feature is disabled.

Let me know what you think about it!

meronz commented 1 year ago

I've tested it again, this is so awesome! Thanks again for the contribution!

Merged to main!

auipga commented 1 year ago

Thank you so much!!