Anyone experimented with search-providers?

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
Post Reply
User avatar
smurphos
Level 6
Level 6
Posts: 1438
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Anyone experimented with search-providers?

Post by smurphos » Tue Feb 13, 2018 1:58 am

Hey all,

Wondering if anyone else has done any experimenting with adding search-providers in cinnamon?

I came across these today - https://github.com/linuxmint/Cinnamon/t ... s-examples

Anyone tried any of them?

I've got a working google search-provider which allows for a google search from the menu search bar. Attached as a zip file for anyone who is interested.

Unzip to ~/.local/share/cinnamon/search_providers

Open ~/.local/share/cinnamon/search_providers/google@linuxmint.com/search-providers.js in a text editor and manually update the hardcoded icon path to point to your home directory rather than mine.

var file = Gio.file_new_for_path('/home/steve/.local/share/cinnamon/search_providers/google@linuxmint.com/icon.png');

Optionally edit the icon size - 128 works nicely in Cinnamenu but is a bit big for the stock menu. 32 is a good size.

var myicon = new St.Icon({gicon: gicon, icon_size: 128, icon_type: St.IconType.FULLCOLOR, reactive: true, track_hover: true, style_class: 'applet-icon'});

Install the Cinnamenu applet - https://cinnamon-spices.linuxmint.com/applets/view/282 - add it to a panel, and in its configuration enable search providers and then enable the google entry. After that you can safely remove Cinnamenu from the panel and uninstall if you wish. Google search will be an option when searching from the stock menu. In Cinnamon DuckDuckGo and Yahoo search are already pre-installed and can be activated in the same way

Image

The setting for enabled search-providers is in dconf / gsettings - org.cinnamon enabled-search-providers - however both the gsettings terminal command and dconf-editor gui app throw an error trying to set the key manually.
Attachments
google@linuxmint.com.zip
(13.34 KiB) Downloaded 24 times

User avatar
Odyseus
Level 2
Level 2
Posts: 53
Joined: Tue May 05, 2015 5:00 am

Re: Anyone experimented with search-providers?

Post by Odyseus » Tue Feb 27, 2018 5:38 am

Hello, smurphos.

I was casually experimenting with Cinnamon search providers today.

You can set the enabled-search-providers from terminal like this (note the escaped quotes in the command):

Code: Select all

gsettings set org.cinnamon enabled-search-providers [\"calc@cinnamon.org\"]
And in dconf Editor you can simply use ["calc@cinnamon.org"].

In both cases, you have to "wrap" the search provider UUID with quotes (single or double) and separate each UUID with commas.

User avatar
Pierre
Level 17
Level 17
Posts: 7304
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Anyone experimented with search-providers?

Post by Pierre » Tue Feb 27, 2018 6:38 am

YEP - - have done that, a little bit, anyway.

the result(s) were a little unpredictable, however, as my Location is not is CONUS,
and most of today's search-providers are CONUS based. :o

thus, some of them are not user friendly, if you are not actually CONUS based,
- some of them, do seem to fix this issue - eventually, but it's still something of a real PiTA

these days, I've been sticking either DuckDuckGo OR StartPage.
but, even those, can often give some unpredictable result(s) on occasions.
:?
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

User avatar
smurphos
Level 6
Level 6
Posts: 1438
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Anyone experimented with search-providers?

Post by smurphos » Sun Mar 04, 2018 6:12 am

Odyseus wrote:
Tue Feb 27, 2018 5:38 am
Thank-you Odyseus - all makes sense all of a sudden.
Pierre wrote:
The google one works OK for me and I got the tracker search provider working. It needs some tweaking though as although it works the output is not pretty and the tracker search applet does a better job at this aspect.

I'm tentatively considering trying my hand on some applet / search provider development to make a small applet that can enable/disable search providers and is bundled with some additional search-providers over and above the cinnamon defaults. There have been a few posts recently for people wanting a global file search from the menu. An improved tracker search-provider would do the job although there may be other ways without having tracker as a dependency.

User avatar
germán
Level 1
Level 1
Posts: 16
Joined: Sat Jul 18, 2015 1:09 pm

Re: Anyone experimented with search-providers?

Post by germán » Wed Apr 04, 2018 2:39 pm

I've also been playing with the search provider system.
¿How about subclassing the SearchProvider class? I'm not sure if that is an alternative syntax or is another thing, but it seems that if you don't define the default functions in the main js file it raises an error.

I have a search provider, do you know if I can submit it somewhere to the Cinnamon spices?

Post Reply

Return to “Cinnamon”