-
Notifications
You must be signed in to change notification settings - Fork 71
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
Make SpaceHammer a Hammerspoon Spoon? #124
Comments
One question that comes to mind though: Would doing this inhibit our ability to make a brew formula?Should still work but the setup script would be different. Other notes:Uses package.path to resolve the spoon path. My current value looks like:
Might be able to insert something like |
Yes, I think at the very least a v1.0 release would do the trick. Maybe we can finagle it so that even if one were to pull in the 1.0 changes as their .hammerspoon it would still work as expected. Maybe even warn them that they should install it as a spoon. Do we want a brew formula if we want a spoon? Brew for hammerspoon makes sense, but then it's just a matter of: hs.loadSpoon("SpoonInstall") -- Maybe they have to install this manually
spoon.SpoonInstall("spacehammer") |
How would fennel be installed there? I think the goal for the brew formula is to make it a 1 liner to install hammerspoon, luarocks, and fennel. In addition to supporting autoupdates |
Currently, Spacehammer is intended to own the ~/.hammerspoon directory. This suits people who first discover Spacehammer but this setup might be alienating to existing Hammerspoon users who don't want to start over again or move their years worth of Hammerspoon config over.
It seems more than possible to put Spacehammer into a spoon. It will need to match the Spoon API so that it exports an object with a
SPOON:start()
function that would handle what our init.lua does now.The problem is this would be a breaking change, so we would need to decide carefully how to best roll that out.
Off the top of my head, I am thinking it might be wise to create a separate organization like Spacehammer/spacehammer.git and the version of that repo can exist as a spoon so it doesn't break everyone's config. This version of the repo can remain unchanged, add a link and deprecation notice to the README.org, and direct issues to the new repo.
Additionally, looking at https://www.hammerspoon.org/Spoons/SpoonInstall.html, we could even have our own repository for spoons written in fennel.
The other anticipated change will likely be updating the fennel search paths to include
*.spoon/init.fnl
which is pretty trivial.This is not a high priority but is a direction we can go if we're interested.
The text was updated successfully, but these errors were encountered: