pablopunk / SwiftShift

Sweet window management for macOS
https://swiftshift.app
MIT License
231 stars 9 forks source link

Feature request: resize direction based on mouse position #40

Closed roelvangils closed 4 months ago

roelvangils commented 7 months ago

What if... the app would resize from the corner matching your mouse pointer's position when you press the shortcut keys for the Resize function?

20240226_222238_Paper@2x

pablopunk commented 7 months ago

That's really interesting, it could be a great solution to https://github.com/pablopunk/SwiftShift/issues/21

roelvangils commented 7 months ago

That's really interesting, it could be a great solution to #21

Indeed! I think it will feel much more natural than adding more modifier key combinations to achieve the same thing. And there's no other app (that I know of) that implements window resizing in this way. So I hope you're going to do it! 😁

roelvangils commented 5 months ago

I was curious about your progress with the app. It holds so much promise, and I'm excited to see how it develops!

pablopunk commented 5 months ago

@roelvangils Hey, I actually gave it a try a while ago and kind of got a very clunky solution working.

The problem is that in order to resize a window programmatically, you need to specify the origin (top-left) and the new size (bottom-right). This works really well for the current behavior because it's just moving the bottom-right all the time. However, resizing from any other quadrant means moving the window and resizing at the same time, which made it very laggy and not a good experience at all.

I didn't find a workaround for that. I'm not sure if there's any; I'm not a Swift/macOS expert. But I'll leave this issue open in case anyone bumps into it and knows how to solve it.

roelvangils commented 5 months ago

@pablopunk hm I get it! 🙂 Thanks for trying! I have no idea how to do it either 😁 It would be nice if someone could up wit ha solution. But since no other similar app does this, it might just be impossible.

roelvangils commented 4 months ago

@pablopunk I found this app. It works a bit different than your app (you need to click in the window, which i don't want) and it doesn't work as smooth. But it does have the feature where you the mouse position inside the windows determines from which side you can start resizing it. Maybe you can get some inspiration from the source code 😁

roelvangils commented 4 months ago

Iti s so nice to see that you have added this functionality to the app! It works exactly as I imagined. Thanks and good luck with the development of the app!

Screenshot

Also, the word quadrant sounds so sophisticated. I like it that you kept it! 🙂

pablopunk commented 4 months ago

@roelvangils thanks! Honestly in my mind I think of "cuadrantes" in Spanish so I was glad it worked on English too 😅