plasma-applet-tiledmenu
plasma-applet-tiledmenu copied to clipboard
Feature request: List recent files too
Cannot seem to find this rather common option in the otherwise so complete tool. It is present in other launchers.
Can this be enabled?
Is that hard to add? I have no real competence but I could try to add it.
You'd need to use Recent Apps as a model. You need to enable RootModel { showRecentDocs: true }
.
- https://github.com/Zren/plasma-applet-tiledmenu/blob/master/package/contents/ui/AppsModel.qml#L48
I parse the RootModel and all it's nested models and convert it to a ListModel and use a single ListView.
The RootModel is:
- RootModel
- [0] = RecentApps
- [0] Firefox
- [1] Dolphin
- [1] = All Apps
- A
- [0] Ark
- [1] Audacity
- A
- [2] = Development
- [...]
- [3] = Education
- [4] = Games
- [...]
- [9] = Power
- [0] = RecentApps
I have the following properties in AppsModel that hardcode the numbers.
property int categoryStartIndex: 2 // Skip Recent Apps, All Apps
property int categoryEndIndex: rootModel.count - 1 // Skip Power
The RecentDocs should modify the model to be like the following:
- RootModel
- [0] = RecentApps
- [0] Firefox
- [1] Dolphin
- [1] = RecentDocs
- [0] ?
- [1] ?
- [2] = All Apps
- [3] = Development
- [...]
- [0] = RecentApps
Since I might reference the AllApps in many places with rootModel.modelForRow(1)
you'll need to update those hardcoded indexes.
If you don't want Recent Apps, then you can probably easily set showRecentApps: false
and set showRecentDocs: true
as a simple workaround.
Consider this a feature request please!
I have succeeded but the result is surprisingly bad.
Edited plasma-applet-tiledmenu/package/contents/ui/AppsModel.qml
- and there set RootModel { showRecentDocs: true }
.
Also set showRecentApps
to false.
Sadly that involves using some of the bad parts in plasma, a kio-slave or something that doesn't work properly. It shows me under "most used" 5 documents that I haven't opened in weeks instead of the last ones. I don't know how this works, I suppose it should show what dolphin shows at recentlyused:/files/?limit=10
or recentdocuments:/
, or timeline:/today/
, but it does not.
(What file/resource is showRecentDocs
referring to?)
As a workaround I have added in Tiled Menu configuration > Sidebar shortcuts a recent_files_dolphin.desktop which was created with the line Exec=dolphin recentlyused:/files/?limit=15
.