pablopunk / SwiftShift

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

Can you add support for monterey ? #19

Closed krushnadeore closed 9 months ago

krushnadeore commented 9 months ago
Screenshot 2024-01-02 at 12 29 28 PM
pablopunk commented 9 months ago

Sorry, I'm trying to downgrade it but there's a few things I use are dependent on macOS 13+:

I don't know how to get around those but I'm guessing it will require maintaining two different versions of the UI, one for macOS 12 and one for macOS 13+.

I'm open to PRs if someones wants to refactor it :)

xezrunner commented 9 months ago

The MenuBarExtra API to handle the menubar item

https://github.com/pablopunk/SwiftShift/blob/300e726a8f267dcd264e3292dfecd0faa02ddb9a/Swift%20Shift/src/app/App.swift#L10-L13

I wonder if using an if #available(macOS 10.13, *) or similar attribute would allow for using a regular window on older macOS versions instead. Could make the menubar icon appear and just act as a shortcut to bring a regular window up, with the same View as the menubar View.

I have no idea how macOS handles launch items before Ventura, but the same if #available trick could allow for solving that too.

pablopunk commented 9 months ago

So I've been working on this one, but I have bad news. I ended up creating a new target just to compile it for older versions and work around all of those issues (menubar logic and login items logic). I did get around them, but then I realized the move/resize logic wouldn't work at all. Not sure why, probably related to how the accessibility API worked before macOS 13.

That's the core part of this app, so I don't want to refactor it all just to support macOS 12. It was becoming a whole other project. That doesn't mean I don't want it to happen, but I'm not going to create a whole new app just for this use case. Feel free to clone this repo and reuse any code you need to make it happen 🙏