davatorium / rofi

Rofi: A window switcher, application launcher and dmenu replacement
https://davatorium.github.io/rofi/
Other
13.04k stars 609 forks source link

DRUN Browser matches multiple visible and invisible fields, causing unexpected results. #656

Closed GordianDziwis closed 6 years ago

GordianDziwis commented 7 years ago

Version

1.3.1

Configuration

follow instructions

Launch Command

drun

Steps to reproduce

What behaviour you see

What behaviour you expect to see

DaveDavenport commented 7 years ago

DRun mode searches through many fields in the Desktop file. That might be providing a very accurate match.

GordianDziwis commented 7 years ago

This explains a lot. Can I turn this off?

DaveDavenport commented 7 years ago

No, this is not configurable.

GordianDziwis commented 7 years ago

So this is intended behavior, even if it goes against the principle of least astonishment?

DaveDavenport commented 7 years ago

That is very subjective.

If I type in 'Text editor' I expect to see all text editors, if I type in 'office' I expect to see my office tools.

The problem is; there is not one solution that pleases everybody. If I try to please everybody and make 100034 options, the tool becomes unmaintainable. (got into this mess before with GMPC that was huge and I only used 1% myself).

GordianDziwis commented 7 years ago

I get your point, keep it simple. But then not searching all fields in the desktop entry should be implemented. I would assume, that the more general use case for drun is to launch applications and not to search for applications. Furthermore by including all fields the results are random for small search strings. For example: Searching fi gives Steam as the first result, but searching st gives htop as the first result.

Maybe a solution could be: Only search the strings which are actually displayed by rofi. Then the search for text still would give all text editors, but not all applications, which have text somewhere in their description.

DaveDavenport commented 7 years ago

I don't agree. rofi should find you what you want, so text editor -> should give all text editors. Then the history part of rofi remembers your favorite commands and makes sure they are sorted at the top. So next time just type a few characters and your command is on top and you can quickly run it.

( It sounds like the functionality of the 'run' switcher matches more what you want, that just matches the executable name.)

GordianDziwis commented 7 years ago

I was about drun and that it matches the token against the category: here is the "offending part". The arbitrary categories wreak havoc with the matches. And because drun does not show the categories, the user is left to wonder wh,y a search for "only" returns htop.

DaveDavenport commented 7 years ago

I added category matching on multiple requests (.f.e. #499). Ill leave this one here, if it gets enough votes I will reconsider.

DaveDavenport commented 6 years ago

@alexozer Please follow the guidelines and make a new issue. Do not make meta issues, as they become hard to keep track off.

alexozer commented 6 years ago

@DaveDavenport really sorry, I posted on the completely wrong issue by accident.

DaveDavenport commented 6 years ago

Fixed with merge request #690.

github-actions[bot] commented 3 years ago

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