Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: List recent files too #140

Open
cipricus opened this issue Nov 17, 2022 · 5 comments
Open

Feature request: List recent files too #140

cipricus opened this issue Nov 17, 2022 · 5 comments

Comments

@cipricus
Copy link

Cannot seem to find this rather common option in the otherwise so complete tool. It is present in other launchers.

Can this be enabled?

@cipricus
Copy link
Author

Is that hard to add? I have no real competence but I could try to add it.

@Zren
Copy link
Owner

Zren commented Nov 20, 2022

You'd need to use Recent Apps as a model. You need to enable RootModel { showRecentDocs: true }.

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
    • [2] = Development
      • [...]
    • [3] = Education
    • [4] = Games
    • [...]
    • [9] = Power

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
    • [...]

Since I might reference the AllApps in many places with rootModel.modelForRow(1) you'll need to update those hardcoded indexes.

@Zren
Copy link
Owner

Zren commented Nov 20, 2022

If you don't want Recent Apps, then you can probably easily set showRecentApps: false and set showRecentDocs: true as a simple workaround.

@cipricus
Copy link
Author

Consider this a feature request please!

@cipricus cipricus changed the title List recent files Feature request: List recent files too Nov 28, 2022
@cipricus
Copy link
Author

cipricus commented Nov 28, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants