abenz1267 / walker

Application launcher similar to Rofi etc. . Wayland native.
MIT License
263 stars 12 forks source link

Give already used items higher search priority #37

Closed ItsDrike closed 1 month ago

ItsDrike commented 1 month ago

Walker does already keep track of previously selected entries in it's history. This is currently used when showing the applications once walker is opened, without any user (search) input.

However, once I type something in to search, this history is disregarded completely and the search just shows the results based on the fuzzy matches ordering.

This is kind of annoying, as many other app launchers actually use the cached history and give the previously selected entries slightly more priority, which makes commonly used items a lot easier to search for quickly.

yylian commented 1 month ago

Also, when opening walker without giving input into the search field, runner type entries are not considered.

Not sure if this fits here, if not give me a heads up and I'll create a new issue.

abenz1267 commented 1 month ago

@ItsDrike I'll look into it.

@yylian only the application's module is considered for initial entries without input and i personally have no interest in other modules being shown. I'm open to PRs though.

abenz1267 commented 1 month ago

I've looked into it and totally forgot that Walker actually has a prefix-based history. This was added in https://github.com/abenz1267/walker/commit/2347ebf178d017951e7fe5297d2e5ebd88c85973 due to another users request.

So basically: the history is weighted in accordingly, but right now it is 100% prefix-based, which means that if for search term: f there's no history for firefox .... firefox won't get any history weighting.

I actually like this behaviour.

abenz1267 commented 1 month ago

I've thought about it a bit more and i think this should be fixed with 3574b4449b8da65742e2b7e71a6cce1db44ecd21 without compromising the initial idea of the prefix-based history.

So the behaviour now is:

yylian commented 1 month ago

Works like a charm. Thank you for reconsidering and implementing!