Extend/Snap to next edge
Ichisich opened this issue · 25 comments
Interesting, do you think it should consider all windows borders or just borders of snapped windows.
The aero snap setting could be the defining factor (Mimic/Smart/Smarter).
This would guaranty a more consistent behavior for most user.
This one should do the trick.
AltSnap1.59test17_i386.zip
AltSnap1.59test17_x64.zip
You have the new action! ExtendTNEdge
also available in the drop down actions list in the config dialog.
I set Extend to next edge
as a while resize action, which sometimes lead the window to get rolled up in the top left corner.
It seems the resize command doesn't get cancelled after the while action, but AltSnap doesn't know exactly what to do with the window.
https://user-images.githubusercontent.com/31080003/219871110-894fc00c-da51-4ca6-a57a-8115bf3269d1.mp4
Setting Extend to next edge
to a dedicated primary button doesn't show this behavior.
I forgot to update the action flag
AltSnap1.59test18_x64.zip
The up roll behavior is fixed, but now the context menu gets activated (my resize button is RMB).
Should be fixed.
AltSnap1.59test19_x64.zip
It is.
Great addtion! Can we make the ExtendTNEdge available to keyboard and command line option?
Great addtion! Can we make the ExtendTNEdge available to keyboard and command line option?
For now you can use -apExtendTNEdge
but it depends on cursor position. 4 new actions will have to be made in order to do this for left/right top/bottom.
With this one you have:
XTNLEdge ("Extend to the next left edge"),
XTNTEdge ("Extend to the next top edge"),
XTNREdge ("Extend to the next right edge"),
XTNBEdge ("Extend to the next bottom edge"),
They can be selected from the config dialog and they can be sed from the command line like AltSnap.exe -afXTNLEdge
Note that in general all actions can be used from the command line but they are generally not extensively tested and might be untested.
@RamonUnch, thank you for the quick implementation. The action works reliably from both keyboard and command line execution. I noticed not all actions are supported in command line. And some of them do not make sense to invoke from command line, (e.g. transparency) as they are more suited for scrolling. But using these actions (Snap, Extend, and Extent to Next Edge) combined with some ahk or mouse gestures, I am able to mimic some of the tiling window managers. Thank you so much!
Nice to hear that, If you have time, you could consider starting a discussion (in the discussion thread) on how to setup AltSnap+AHK to mimic a tiling window manager, I am sure some people would be interested in that.
I have thought several times working on a tiling mode with Windows but it is not yet in the order of things. Plus I am unfamiliar with tiling windows managers in general, I have played a little with one of them but not enough to be comfortable with them.
So Snap to next edge would actually just move the window? Is this what you are suggesting?
Could be both a separate action and available with Shift.
So Snap to next edge would actually just move the window?
Yes.
Could be both a separate action and available with Shift.
I see the relation between Extend to next edge
and Snap to next edge
similar to Extend to Side/Corner
and Snap to Side/Corner
.
So the handling convention would dictate both.
One issue found with [AltSnap1.59test20_x64.zip] is that custom theme no longer gets loaded. @RamonUnch , can you please confirm?
I have this in my ini, btw,
Theme=erasmion
One issue found with [AltSnap1.59test20_x64.zip] is that custom theme no longer gets loaded. @RamonUnch , can you please confirm?
I do confirm, it is a typo I made while refactoring.
AltSnap1.59test21_x64.zip
Nice to hear that, If you have time, you could consider starting a discussion (in the discussion thread) on how to setup AltSnap+AHK to mimic a tiling window manager, I am sure some people would be interested in that.
I have thought several times working on a tiling mode with Windows but it is not yet in the order of things. Plus I am unfamiliar with tiling windows managers in general, I have played a little with one of them but not enough to be comfortable with them.
Will definitely write up for this.
@RamonUnch , I found Chrome like browsers or electron apps has troubles when moving to the rightmost zone. The right side of the window are cut off (min, max, close buttons) or shift over the right edge so they are invisible. See the screenshot. This problem does not happen with normal desktop apps such as notepad, explorer window etc. Can this issue be addressed in the AltSnap? By the way, I am using Grid Layout (5x2).
See the screenshot for the issue. The red line indicate the right side screen boarder.
I found the root cause of this issue is that Chrome and its derived apps has minimal size and cannot shrink below that size. See: https://stackoverflow.com/questions/59199833/chrome-doesnt-scale-below-x-500px. FancyZone has the same issue. So this not an issue with AltSnap but rather the design of Chrome.
This one adds the Move To Next edge option. Also accessible via shift on Extend to next edge and vice-versa.
Also keyboard versions were added, this was quite straightforward, I Think I will work on testing for 1.59 release and stop features now.
The test23 versions works well for me. Having the shift key behaves like the rest of actions makes lots of sense.
1.59 Released