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

[REQUEST] Change matching algorithm on the fly #2051

Closed
2 tasks done
ricardoseriani opened this issue Nov 22, 2024 · 3 comments
Closed
2 tasks done

[REQUEST] Change matching algorithm on the fly #2051

ricardoseriani opened this issue Nov 22, 2024 · 3 comments
Milestone

Comments

@ricardoseriani
Copy link

ricardoseriani commented Nov 22, 2024

Before opening a feature request

  • I checked the next branch to see if the feature has already been implemented
  • I searched existing reports to see if it is already requested.

What is the user problem or growth opportunity you want to see solved?

Change matching algorithm on the fly

For example, let's suppose I have 2 software: kdocker and rootless-kit-docker
While search for kdocker using the fuzzy matching algorithm, it's show both, like it's meant to.
Using fzf to filter this list, I can search for 'kdocker and it will change the algorithm to exact-match and only show kdocker
I would like a way to change the matching algorithm on the fly, like fzf does (See https://github.com/junegunn/fzf?tab=readme-ov-file#search-syntax for some examples) or at least change the currently matching algorithms with some prefix or key bind.

How do you know that this problem exists today? Why is this important?

While using rofi with matching set to fuzzy, I searched for kdocker, like the example above, and try to change the matching algorithm to filter some cases on the fly.

Who will benefit from it?

I think that, if implemented in a way like FZF or with a keybinding, anyone who already uses FZF will benefit from this.

Rofi version (rofi -v)

1.7.1

Configuration

https://gist.github.com/ricardoseriani/8fb834e7f0a027e8c07ecc04a43a9957

Additional information

No response

@DaveDavenport
Copy link
Collaborator

On the i2051 branch added some code that allows you to cycle through matching method and it shows (for 3 sec) the method selected.
Please test.

Image

@ricardoseriani
Copy link
Author

Wow, that's awesome 🥳.
I tested it for some time, and it appears to work pretty fine to me.
If I could just add my 2 cents, if possible, make one option to configure for how much time it will show the current selected method, and one to adjust what methods and in which order they're available, so I can disable the one's that I don't care.

@DaveDavenport
Copy link
Collaborator

Updated PR with suggestions.

@DaveDavenport DaveDavenport added this to the 1.7.9 milestone Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants