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

Enhancement: Add edge magnetism #19

Open
dlehman opened this issue Dec 17, 2019 · 8 comments
Open

Enhancement: Add edge magnetism #19

dlehman opened this issue Dec 17, 2019 · 8 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@dlehman
Copy link

dlehman commented Dec 17, 2019

As a suggestion, add a user preference to "stop at screen edge" which would stop moving the current window (in that direction) once it hits a screen edge.

Currently, when you move past a screen edge (left, right, bottom), the window can be moved partially off-screen.

@dlehman dlehman changed the title Option: User preference to "stop at screen edge" Enhancement: User preference to "stop at screen edge" Dec 17, 2019
@ChasonDeshotel
Copy link

And/or a new key combination. For example, adding shift to your current hotkey would cause it to stop growing at the screen edge or if you want to get fancy adding shift once it's past the screen edge would snap it back

@finestructure
Copy link
Owner

Sorry, @dlehman , I completely missed your issue here.

To be honest, I actually want it to act this way. What I might do is add a little magnetism at the screen edge. I thought it was already there thanks to the underlying window management but when I tested it just now it worked only when moving windows via the title bar.

On the other hand the fact that I didn't know for sure is a good indicator how often I actually look for this :)

@ChasonDeshotel I feel like in a way - the reverse - this is already there. I'm using the default keys (surprise! ;)) of fn+ctrl to move and the additional opt to resize. So I can just move to the edge by holding fn+ctrl and then pressing opt when I hit the edge to shrink it.

That is when I'm at the left edge. On the right it takes a little extra push and shove as the resize acts on the lower right of the window. Still, I think it'd be very hard to explain that additional modifier behaviour. (I'm not even sure I fully understood what you're describing, to be honest.)

@finestructure finestructure added the enhancement New feature or request label Feb 7, 2020
@bxsx
Copy link

bxsx commented Mar 23, 2020

To be honest, I actually want it to act this way. What I might do is add a little magnetism at the screen edge. I thought it was already there thanks to the underlying window management but when I tested it just now it worked only when moving windows via the title bar.

+1 for magnetism instead of total locking.

Keep in mind that user can connect multiple displays so total locking could avoid to move windows between screens.

@bxsx
Copy link

bxsx commented Mar 23, 2020

Spark application has a problem here.

For most applications, once I moved the window to the edge, it should just "push back" a little to see the window. However, instead of "pushing back" Spark moves totally out of screen and it's not easy to bring it back.
Super annoying :(

@finestructure
Copy link
Owner

@bartskowron You mention Spark - did you mean to post this elsewhere or is this related to Hummingbird? It's not clear to me if you're referring to a problem with Spark (I don't know what Spark is/does btw) or Hummingbird.

@bxsx
Copy link

bxsx commented Mar 24, 2020

Spark is an email client app: http://sparkmailapp.com and while moving the app via Hummingbird it behaves as described above.
Please take a look, Spark doesn't use a standard UI and I believe this is the issue. On the other hand, alternative apps for moving windows work correctly with Spark.

@finestructure finestructure changed the title Enhancement: User preference to "stop at screen edge" Enhancement: Add edge magnetism Sep 10, 2020
@finestructure
Copy link
Owner

finestructure commented Sep 11, 2020

Best I can tell right now this doesn't seem to be possible, at least not in the way HB works right now or without a lot of hackery. The issue is that the window in HB is an AXUIElement but in order to get the screen (NSScreen) that the window is on, I need an NSWindow (and use its screen property).

NSScreen.main by itself fails when moving windows that aren't in the foreground on a secondary screen.

@finestructure finestructure added the help wanted Extra attention is needed label Sep 11, 2020
@apotenza92
Copy link

Hi has there been any additional movement on this idea? I think the way AltSnap does this on Windows 10 is great. It's optional whether to magnetise to screen edges or even other windows. It also lets you use snapping zones to quickly flick windows around into quarters / halves etc.

If Hummingbird somehow managed to move windows using the native technique it could get snapping for free with the help of other apps like Rectangle. I'd gladly pay more for Hummingbird if it included more of these options. Unfortunately I'm not experienced enough to be able to code something like that.

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

No branches or pull requests

5 participants