plasma-applet-tiledmenu icon indicating copy to clipboard operation
plasma-applet-tiledmenu copied to clipboard

App search is not good. (Exclude file search, prioritised latest use)

Open HubKing opened this issue 6 years ago • 7 comments

I am not sure if other people uses start menu search field to search files in their hard disk or not, but when I type in it, I am only looking for apps and control panel items, not files.

Currently, the search seem kind of unoptimised. There seems to be no way to exclude file search (desktop search). So, when I want Chrome, typing "c" shows weird apps that does not even start with "c", and "ch" shows weird files somewhere in the disk, and Chrome appears only when I type "chr".

And it seems that the choice is not intelligently remembered, unlike Windows. I have to type "chr" again next time. For the same reason, typing "o" does not show "Opera" at the top, but Konsole. Typing "op" shows Opera, but next time I type "o", it shows Konsole again at the top. Shouldn't it be Opera next time?

HubKing avatar Dec 01 '18 09:12 HubKing

This widget uses the same search API as the the App Menu, App Dashboard, and the default App Launcher widgets. All of the default widgets have the ability to hide "other results" though. I was working on the "Filters" UI when I wrote the search, which is how Win10 provided the ability to switch filters. I added checkboxes (disabled atm) which were suppose to provide the ability to toggle specific "krunner plugins" in the search results.

And it seems that the choice is not intelligently remembered

I'm not sure how the results are weighted. I could maybe keep a (separate) history of recently run commands like KRunner does. I played around with "remembering old commands and autocompleting the text like KRunner (selecting the autocompleted part to you replace it as you type).

  • https://github.com/KDE/plasma-desktop/blob/master/applets/kicker/plugin/runnermodel.h
  • https://github.com/KDE/plasma-desktop/blob/master/applets/kicker/package/contents/ui/main.qml#L152-L174
  • https://github.com/KDE/plasma-desktop/blob/master/applets/kickoff/package/contents/ui/SearchView.qml#L50-L67

So

  1. Finish the "Filters" menu. Maybe provide a similar GUI in the widget config so it's more visible to the user.
  2. Toy around with keeping a search history that autocompletes like KRunner.

Zren avatar Dec 02 '18 01:12 Zren

I have tested the default "Application Launcher", and the result was kind of similar. Typing "c" did not show Chrome at all (the top item was Default Applications). "ch" showed "Google Play Music", and "chr" showed Chrome.

On the other hand, the Plasma search feature (alt + shift) showed Chrome right when I typed "c". It also remembered the choice. When I first typed "op" it showed "OpenGL" at the top, but after I chose "Opera", the next time I typed "o" or "op" it showed and auto-completed "Opera".

HubKing avatar Dec 03 '18 00:12 HubKing

@Zren Can we please have at least an option to hide files for now?

Bleuzen avatar Jun 05 '20 14:06 Bleuzen

In the short term, edit:

  • ~/.local/share/plasma/plasmoids/com.github.zren.tiledmenu/contents/ui/SearchModel.qml
  • https://github.com/Zren/plasma-applet-tiledmenu/blob/master/package/contents/ui/SearchModel.qml#L65

Comment out or remove 'baloosearch', which I think is the file search.

Zren avatar Jun 05 '20 23:06 Zren

Thanks, this works for now. Btw. I also uncommented the 'calculator', why is it commented out by default?

Bleuzen avatar Jun 06 '20 09:06 Bleuzen

Git Blame that line:

  • https://github.com/Zren/plasma-applet-tiledmenu/blame/master/package/contents/ui/SearchModel.qml#L68
  • https://github.com/Zren/plasma-applet-tiledmenu/commit/7dc8a08777bc30e3172e36aeecf003624f44fa24

With my code, it was crashing plasmashell. I can't reproduce the crash atm in Plasma 5.18. Might as well re-enable calculator should I make the default filters configurable.

Zren avatar Jun 06 '20 13:06 Zren

Can't reproduce either. Guess this could be re-enabled. User selectable options for the filters would be nice to have, sure.

Bleuzen avatar Jun 06 '20 15:06 Bleuzen