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

New features for macOS Monterey #2895

Closed
2 tasks done
cmsj opened this issue Jun 9, 2021 · 9 comments
Closed
2 tasks done

New features for macOS Monterey #2895

cmsj opened this issue Jun 9, 2021 · 9 comments

Comments

@cmsj
Copy link
Member

cmsj commented Jun 9, 2021

  • Expose a Shortcuts intent for running Lua
  • Add hs.shortcuts to enumerate and run Shortcuts
@cmsj cmsj pinned this issue Jun 9, 2021
@latenitefilms
Copy link
Contributor

If these get added, will Hammerspoon still be able to run on Mojave?

@asmagill
Copy link
Member

asmagill commented Jun 9, 2021

I've noted in the past that I'm willing to do some work to try and maintain compatibility with Catalina for a while yet (my iMac can't run anything newer, and I don't use it often enough to justify replacing it any time soon -- it's mostly used as a file and print server).

I suspect that any wrappers or run-time checks I'll need to add would also work for Mojave, though I may need you to test that for me as and when it occurs.

@latenitefilms
Copy link
Contributor

Can do! I'm hoping to jump across to Big Sur or Monterey at some point, but I kinda just want to wait until new MacBook Pro's arrive first.

@cmsj
Copy link
Member Author

cmsj commented Jun 9, 2021

The second one - enumerating and running Shortcuts from Hammerspoon, will definitely be fine with older OSes - it needs to happen by communicating with the Shortcuts Events process over Apple Events, so there's really no SDK dependency there at all.

The former one..... I have no idea yet, it'll need a static Intents definition file in the app bundle which I guess the older OSes will just ignore, and a couple of classes to handle the incoming Intents. I would guess that the SDK will let those exist in the code on older releases and we'll just have to use some @available macros to avoid instantiating them.

I've requested a WWDC Lab appointment for this Friday to talk to the Shortcuts team, to ask this kind of thing, so if people have any other questions about Shortcuts and Hammerspoon, now is definitely the time to ask them :)

@cmsj
Copy link
Member Author

cmsj commented Oct 28, 2021

I've got hs.shortcuts implemented and working, but I'm currently struggling with exposing an action to Shortcuts. As far as I can tell I've got everything set up right, but it's not appearing in the Shortcuts app. More investigation to be done I guess!

@latenitefilms
Copy link
Contributor

Maybe something to do with code-signing or entitlements?

@cmsj
Copy link
Member Author

cmsj commented Oct 29, 2021

Yeah it was signing. I'm getting closer to having it working, but right now the limiting factor is how long it takes me to generate a properly signed and notarised build. I may end up making some more build script changes just to try and speed this up!

@cmsj
Copy link
Member Author

cmsj commented Oct 29, 2021

@latenitefilms do you use release.sh? I might want to pull stuff like Sentry uploading out of Xcode scripts.

@latenitefilms
Copy link
Contributor

I do use release.sh, but it's a modified version - where I just manually try and bring across any tweaks you make to the Hammerspoon version.

Whilst I've got you though... one thing that I haven't solved is that for whatever reason, I need to run the script twice for the build number to update correctly. Any ideas why that might be the case?

@cmsj cmsj closed this as completed Nov 3, 2021
@cmsj cmsj unpinned this issue Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants