Anyone experimented with search-providers?

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Anyone experimented with search-providers?

Post by smurphos »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
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 »

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 21
Level 21
Posts: 13204
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Anyone experimented with search-providers?

Post by Pierre »

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 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Anyone experimented with search-providers?

Post by smurphos »

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.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
germán

Re: Anyone experimented with search-providers?

Post by germán »

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?
Locked

Return to “Cinnamon”