Replies: 3 comments 3 replies
-
It seems like JXA is able to listen to events as long as something like that is running: https://stackoverflow.com/questions/49501983/trigger-a-script-applescript-or-jxa-on-app-running. I'm not seeing anything socket-like built into JXA, so per @borkdude, the path might be to integrate something nrepl-y into an obb daemon, and optionally stick that into |
Beta Was this translation helpful? Give feedback.
-
It is possible to compile JXA scripts themselves into What do you think, @willcohen?
Check out |
Beta Was this translation helpful? Give feedback.
-
@willcohen See https://github.com/babashka/obb/blob/main/doc/application-bundle.md |
Beta Was this translation helpful? Give feedback.
-
I was thinking this morning that an eventual option alongside the cli might be an
.app
as well -- it seems, at first glance, like the biggest outstanding difference between something like Hammerspoon and this is thatobb
still has no clear capability for running outside of an ad-hoc manner. If there were a canonicalobb.app
that could startup and listen for events, it could collect various ad-hoc additional scripts and respond to those events accordingly.What I still haven't thought through in any detail is how that would work. Could it be as simple as, ultimately, a "fancy" .cljs script that itself uses obb to create a process that can load and unload scripts and perhaps even spit out a really simple GUI? If so, then I suppose the hardest part would be thinking through the eventual API for what can be listened to, and how scripts can be loaded and unloaded.
Beta Was this translation helpful? Give feedback.
All reactions