It is strange to talk about improvements when the product does not yet exist, but there are a few important ideas that deviate from original KRunner that I’ve been working on.

I’ve already ported a few of the more important runners in order to be able to test the infrastucture. While doing this, I’ve been able to detect a few deficiencies of the current design. So I decided to go over the design of KRunner and the way it used to generate the results in order to which parts could be improved.

Reusing the results

In the old KRunner, the user would type a query, and the runners would generate the results for that query. Now, if you added another character to the query, the runners would generate all the results for that new query from scratch.

This is suboptimal. When the user types ‘kons’ and gets Konsole as the result, typing ‘o’ should not remove konsole from the list only to add it again because it still matches the input string ‘konso’.

Now each runner can add the whole string it used for matching to the result. So, in the case of Konsole, it could pass something like ‘Konsole - Terminal’. This way, the GUI part of KRunner will be able to tell that this result is still relevant and that it should keep it in the list. Runner that searches for files might even pass a section of the text where the query appears (this might even be useful to show in the UI - like Recoll does).

Merging the results

The second thing that I always found strange is that if two different runners returned the same result, KRunner will show the result twice. Just enter ‘konsole’, and you will get ‘Konsole’ and ‘Run konsole’.

Now, if two runners return the same thing, the results will be combined, and the result will get a higher score. Since the score (or relevance) is a number between 0 and 1, these are combined in a fun math way used in fuzzy logic.

Result owner

The other problem in KRunner is that each runner is tasked to handle the results it has created. This means that you might get different available actions for the same file if it was returned by two different runners.

So, the second change was to rethink what is a result in KRunner.

Instead of each runner owning its result, it will now, by default, only need to explain what the result is. That way, if it is a file, the GUI will know what actions to provide, if it is an application, the GUI will know what actions to provide, etc. If it is something unorthodox, then, and only then, the runner should be asked how to execute it.

When?

It is difficult to predict, but I hope I’ll be able to make a preview version (called ‘Blade’) by the end of July. The current plan is to release it as a separate application – for testing purposes only, and after that I’ll have to go one KRunner feature at a time to make sure it has no obvious regressions.

The worst part is that, thanks to Kai Uwe, KRunner is now a moving target and I’ll have to play catch-up with all the features he adds to main KRunner. :)