Nemo plug-in API / examples

Get involved, create or participate in a project.
stefan_o
Level 1
Level 1
Posts: 3
Joined: Wed Jan 11, 2017 4:40 pm

Nemo plug-in API / examples

Postby stefan_o » Wed Jan 11, 2017 5:04 pm

Hey,
I would really love to have a simple, but powerful file search function inside Nemo, similar to the one that existed in Windows 2000. For example find "*.jpg", last modified between 1.5.2016 and 1.10.2016, filesize larger than 2MB, maximum dir depth 3 levels.
I already wrote a minimalist example that performs the search, but I couldn't find any information how to integrate into Nemo. My idea is to have an additional button and a menu entry for advanced search and if clicked the sidebar changes (or is shown if disabled) to show search parameters. You click search, the main frame with files is cleared and new title of windows is "search result", it starts searching and most important feature: Results are displayed life, if you see the file you were looking for, just press stop.

My question now: Is there a plug-in API (in C) that allows:
1) Allows new buttons/menu entry
2) Replace sidebar
3) Allows showing a custom list of files

Best regards,
Stefan

deepakdeshp
Level 8
Level 8
Posts: 2370
Joined: Sun Aug 09, 2015 10:00 am

Re: Nemo plug-in API / examples

Postby deepakdeshp » Thu Jan 12, 2017 8:38 am

If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 18 Cinnamon 64 bit with AMD processor .

stefan_o
Level 1
Level 1
Posts: 3
Joined: Wed Jan 11, 2017 4:40 pm

Re: Nemo plug-in API / examples

Postby stefan_o » Thu Jan 12, 2017 9:48 am

Hello,
while this scripting functionality looks interesting, I don't think it's possible to do with them what I'm planning to do.
Is there any example of a sidebar other than places and tree view as a plug-in/extension?
Best regards
Stefan

User avatar
xenopeek
Level 24
Level 24
Posts: 21369
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Nemo plug-in API / examples

Postby xenopeek » Tue Jan 24, 2017 4:48 am

While there is a lot of documentation available for Cinnamon development (just install cinnamon-doc package and access the DevHelp menu entry under the Programming category in your menu after installation) I don't know of a ready set of documentation like that for Nemo development. I think you will have to write an extension. You can find the source code for Nemo extensions maintained by Linux Mint here https://github.com/linuxmint/nemo-extensions. Possibly the Nemo extensions library source code itself will also be useful: https://github.com/linuxmint/nemo/tree/ ... -extension. Perhaps nemo-terminal will be useful to look at; it adds a pane above the file list (click to enlarge):

Image

To try it out install the nemo-terminal package and in Nemo go to Edit > Plugins and ensure in the Extensions box it is enabled.

For more help I'd suggest getting in contact with the developers. You can find them on our IRC channel #linuxmint-dev on irc.spotchat.org. Just open HexChat from your menu to connect to the Linux Mint IRC support channels and type /join #linuxmint-dev to join the develop channel. Helpful hints on how to be most effective on this channel noted here: http://developer.linuxmint.com/contributing.html
Image

stefan_o
Level 1
Level 1
Posts: 3
Joined: Wed Jan 11, 2017 4:40 pm

Re: Nemo plug-in API / examples

Postby stefan_o » Tue Jan 24, 2017 10:45 pm

Thank you very much! I already looked at the source at it seems that there is no way for an extension to create a custom sidebar, the two possible sidebars seem to be hardcoded at a lot of places.
As there is already a search function (where now the terminal in your picture is), I rather want to improve that one than to reinvent the wheel. I already made a first improvement, allow wildcard search (without breaking backward compatibility with existing search phrases).
I have been to the IRC channel and I made a git pull request like I was told to, but no reaction yet: https://github.com/linuxmint/nemo/pull/1397

One major problem with the search that really annoys me, it does not show partial results. But problem is not the search itself, even when every file is reported immediately (default behavior wait until at least 500 files are on the list and then report), at some point all the update events are stalled and processed when search is finished. I couldn't figure out the problem, probably related to multi-threading.


Return to “Community Projects”

Who is online

Users browsing this forum: No registered users and 1 guest