anyrun icon indicating copy to clipboard operation
anyrun copied to clipboard

Add entry priority for applications plugin

Open HelloWorld017 opened this issue 3 months ago • 3 comments

Summary

Adds new configuration option to sort the entries to the applications plugin.

// Can be ActionsFirst (default), ApplicationsFirst, NoPriority
entry_priority: Some(ApplicationsFirst)

Motivation

#257

Screenshot

With ActionsFirst: image

With ApplicationsFirst: image

HelloWorld017 avatar Sep 25 '25 12:09 HelloWorld017

Alright the code looks good now, but at least in my testing the setting didn't actually have any effect (with both the Zen browser and Firefox the main entry appeared first regardless of the priority setting). I think the weights need to be adjusted so that it works like expected.

Kirottu avatar Sep 28 '25 14:09 Kirottu

Sorry for late reply :cry:

I think the weights need to be adjusted so that it works like expected.

I have adjusted weights so that in ActionsFirst, the actions could be show along the original application. (95f88d82712342b6aa5648d18b3496f95564879d)

I'm not certain whether should we apply this in the general scoring logic (like below), or only in the ActionsFirst case.

let mut score = (name_score * 10 + desc_score * (if entry.is_action { 5 } else { 1 }) + keyword_score) - entry.offset;

For now, to maintain original scoring logic, and not to surprise users, I only applied this to the ActionsFirst. Please notice me if there are another good ways to improve scoring.

Thanks!

HelloWorld017 avatar Oct 23 '25 14:10 HelloWorld017

I'm not certain whether should we apply this in the general scoring logic (like below), or only in the ActionsFirst case.

To fix your case, it seems that boosting description for action should be applied to both priorities. I have applied a5a916c and tested with the Firefox and Fileroller, but I wonder whether it works on the Zen Browser and Libreoffice case, too.

HelloWorld017 avatar Nov 11 '25 15:11 HelloWorld017