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

Add support for additional field on script entries meta #1052

Merged
merged 4 commits into from Feb 1, 2020

Conversation

jdost
Copy link
Contributor

@jdost jdost commented Jan 9, 2020

Purpose

For some script mode usages and displays, the content is given additional information to help in finding the desired output (like with the rofimoji and kaomoji rofi user scripts). Since there is already a spec and support for adding icons, it seems sensible to add in a "meta" field for entries to provide matchable text but not include it in the primary entry field.

Implementation

Following the same logic as used for parsing the icon field on an entry, an additional meta field is added and parsed out. This field is then used along with the primary entry content when doing token matching. This is similar in behavior to how the drun dialog works with matching things like keyword or category for more contextual searching.

The purpose of this is to provide support for "hidden" fields on a
script item that work for search but don't get displayed.  This is
mostly to provide something similar to the optional display (but still
matchable) fields in drun like "categories" or "keywords".  This also
enables the choice to display unicode icons but still allow for
searching for the keywords without needing to print them.
This fields provides a matchable but unprinted string for entries in a
script mode list match.  This means you can use one thing but provide
multiple options that can match that item without polluting the list
view or make confusing output.
@jdost
Copy link
Contributor Author

jdost commented Jan 9, 2020

@DaveDavenport
Copy link
Collaborator

Looks good.

@DaveDavenport DaveDavenport merged commit 83c2e46 into davatorium:next Feb 1, 2020
@DaveDavenport
Copy link
Collaborator

Thanks.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants