plasma-applet-tiledmenu
plasma-applet-tiledmenu copied to clipboard
App search is not good. (Exclude file search, prioritised latest use)
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?
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
- Finish the "Filters" menu. Maybe provide a similar GUI in the widget config so it's more visible to the user.
- Toy around with keeping a search history that autocompletes like KRunner.
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".
@Zren Can we please have at least an option to hide files for now?
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.
Thanks, this works for now. Btw. I also uncommented the 'calculator', why is it commented out by default?
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.
Can't reproduce either. Guess this could be re-enabled. User selectable options for the filters would be nice to have, sure.