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

[WIP] Offer some features à la carte #26

Closed
wants to merge 1 commit into from
Closed

Conversation

jasonrudolph
Copy link
Owner

Historically, if you wanted to use only a subset of this repository's functionality, you've had to edit the code to apply your customizations (e.g., removing the require statements for features you don't want). This PR explores one option for providing a more à la carte offering.

It's just an exploration for now. It's too soon to say whether this will be something that's worth merging. 🔮

Approach

The recent 0.9.53 release of Hammerspoon introduced an official mechanism for distributing custom Hammerspoon-based plugins known as Spoons. From the Hammerspoon docs:

Spoons are intended to be pure-Lua plugins for users to use in their Hammerspoon configs. As a community, we have created many great configurations for Hammerspoon, but sharing code between them is hard and fragile. Spoons have been created as a way to address these issues. Users should be able to download a Spoon and quickly integrate it into their config without worrying about what it is doing internally.

If I can extract some of this repository's features into standalone Spoons, and if doing so makes it easier for people to choose the custom subset of features they want, and if it doesn't significantly increase maintenance overhead, then I'd love to make it happen. 🤞

Proof-of-concept

As a starting point, I've extracted a Spoon to provide the functionality that allows you to tap caps lock for escape and hold caps lock for control. Instead of housing that functionality directly in this repository, that functionality is available à la carte as a Spoon (https://github.com/jasonrudolph/ControlEscape.spoon), and this branch includes that Spoon as a submodule. For people that only want that one feature, they have access to it via that standalone Spoon. For people that want all of this repository's features, this branch continues to provide all of the original functionality.

TODO

@adamyonk
Copy link
Contributor

I think this is a great idea! Set up an early version of Pust-to-talk here: https://github.com/adamyonk/PushToTalk.spoon

@jasonrudolph
Copy link
Owner Author

Closing this out for now. I may revisit it at some point in the future.

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

Successfully merging this pull request may close these issues.

2 participants