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

[Feature Request]: hs.chooser callback function to filter the results #3688

Open
Sleepful opened this issue Sep 17, 2024 · 3 comments
Open

Comments

@Sleepful
Copy link

Allow the user to set their own "filtering" function for results within the chooser based on the query.

This would allow the user to create their own algorithm to search the results, such as fuzzy searching or something else.

Fuzzy searching idea mentioned here:

#1149

@Sleepful Sleepful changed the title [Feature Request]: callback function to filter the results [Feature Request]: hs.chooser callback function to filter the results Sep 17, 2024
@latenitefilms
Copy link
Contributor

I'm pretty sure this is already possible? You can change what the chooser displays however/whenever you want.

Maybe have a look at:

https://github.com/CommandPost/CommandPost/blob/develop/src/plugins/core/action/manager/activator.lua

@Sleepful
Copy link
Author

@latenitefilms I will take a look, I didn't find anything inside https://www.hammerspoon.org/docs/hs.chooser.html

@latenitefilms
Copy link
Contributor

Just watch queryChangedCallback() to changes to the query, and update the choices accordingly?

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

2 participants