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

[Snap layout] Save multiple layouts to support changing monitors configuration #232

Closed
onguarde opened this issue Jul 25, 2022 · 11 comments · Fixed by #361
Closed

[Snap layout] Save multiple layouts to support changing monitors configuration #232

onguarde opened this issue Jul 25, 2022 · 11 comments · Fixed by #361
Labels
enhancement New feature or request

Comments

@onguarde
Copy link

At home, I use multiple monitors. My laptop monitor is one of the monitors, in portrait mode.

When I'm using my laptop on the go, laptop monitor is in landscape mode.
However, the alt snap layout is stuck to the old layout. It seems that we don't have a way to support multiple layouts.

The workaround is to setup a new layout, overwriting the existing, using,
image

However, this gets tedious after a whille. A nice enhancement would be to support saving multiple snap layouts.
A stretch would be to support automatic selection of the saved layouts, based on the number of monitors connected to it.

In Microsoft Powertoys, I also need to enable/reenable and reapply an existing layout. The good thing is, the same layout that I use for my main monitor (FHD), works for my laptop (HD).

image

@RamonUnch RamonUnch added the enhancement New feature or request label Jul 25, 2022
@RamonUnch
Copy link
Owner

RamonUnch commented Feb 11, 2023

@onguarde
I am finally working on this enhancement.
You can now select several Snap-layouts. With This build. The last selected layout will be automatically used upon restart.
To configure a new SnapLayout, you need to:

  1. Add the MaxLayouts=X in the [Zones] section of the .ini file X = 0-10.
  2. Select it in the tray menu.
  3. Configure your test Windows
  4. Hit the save test window as snap layout.

It is still in development but it should be already usable.

Snaps

AltSnap1.59test2_x64.zip
AltSnap1.59test2_i386.zip

@Ichisich
Copy link

Unfortunately, 1.59test2 is too unstable on my system to test this enhancement.

@RamonUnch
Copy link
Owner

Strange, try with this one:

AltSnap1.59test3_x64.zip

@Ichisich
Copy link

Same issue.
As soon as I apply a change, (GUI, ini file or tray menu), AltSnap crashes.

@RamonUnch
Copy link
Owner

Well I just realized that I did an obvious mistake that kicks in when enabling/disabling AltSnap.
AltSnap1.59test4_x64.zip

@RamonUnch
Copy link
Owner

RamonUnch commented Feb 12, 2023

Now you should have the total resolution of each layout shown next to it, also when you change the display settings, AltSnap will try to find a perfect match in the available layouts and will set it if it finds it.

You can also specify several Grid layouts if you use GridMode, using GridNx/y1, 2, 3 etc.

GridNx=3
GridNy=2
GridNx1=4
GridNy1=3
GridNx2=2
GridNy2=2

In Grid mode the Grid dimensions will be shown next to the Snap layout entry.
Also Also on display change the Grid dimensions will be properly re-calculated. No automatic layout changing in Grid mode though.

@Ichisich
Copy link

I only have one monitor, so I tried to emulate it by changing the resolution.
AltSnap reliably recognized the proper layout.

One improvement I would suggest.
Sometimes additional layouts could also be useful on the same display setup.
Switching through layouts by pressing the mod key while shift+dragging a window should be intuitive enough.
Preferably, only cycle layouts which align with the current monitor setup.

@RamonUnch
Copy link
Owner

Sometimes additional layouts could also be useful on the same display setup.
Switching through layouts by pressing the mod key while shift+dragging a window should be intuitive enough.
Preferably, only cycle layouts which align with the current monitor setup.

Indeed could be nice, but I was more thinking about Using the mouse wheel while in Snap to zone mode, like this people that you can go next/previous layout.
Of course my usage is that changing layout is not so often so I am not sure if a shortcut is mandatory. Even when working on the same monitor if I change the layout it would be to work with a different set of applications, So I would not for instance snap a window with layout 1 then switch to layout 2 and snap an other one.

An interesting thing to do would be to setup a different snap layout for each virtual desktop. I will save this for future work, because Win10 virtual desktops support would lead to a big set of changes when it comes in, and It is not yet there.

The main focus is to first have a perfectly fine multi layout support with the minimal amount of smartness to begin with.

@zhichaoh
Copy link

@RamonUnch , I found when I changed layout (using grid layout). In order to activate the Move to Zone action (using keyboard shortcut), I have to move the window using altsnap first. Otherwise, Move to Zone will be activate. This happens when the AltSnap starts or every time after the layout changes.

@RamonUnch
Copy link
Owner

@zhichaoh
Copy link

Works like a charm! Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants