Internet Search Box 2.0

UUID: search-box@mtwebster
Score: 14

Download



NOTE: IF YOU'RE UPGRADING TO v2.0, YOU NEED TO DELETE THE FILE:

~/.cinnamon/search-box@mtwebster/providers.conf

AS THE FORMAT HAS CHANGED.  I APOLIGIZE FOR THE INCONVENIENCE

This is a Cinnamon applet, which adds a Web Search box to your Cinnamon bar.
 
Left-clicking the item will open a search box where you can enter your criteria.
You can right-click the applet to gain access to settings - switch providers, hide or show the provider name in the panel, or directly edit the config file to add your own provider.
 
Installation
================
 
        1) Unzip, copy the folder "search-box@mtwebster" to "~/.local/share/cinnamon/applets/".
 
        2) Enable the applet in cinnamon settings.
 
If you change providers, you'll have to restart Cinnamon
 
 
Changelog:
 
  • 1.01 - Set key focus to search box as soon as applet is clicked.  Remove some old code
  • 1.1 - Change icon to symbolic, add switch in provider.conf to hide or show icon label (provider name)
  • 1.2 - Use xdg-open to launch browser and provider.conf editor so things work more properly across Linux flavors.
  • 1.3 - Back to using sensible-browser.  Added provider.conf reload button.  Added launcher for MATE default applications - this lets you set sensible-browser correctly.  Should work in Ubuntu mint and debian mint.
  • 1.31 - Back to xdg-open, removed default app launcher - need to find a better, more reliable way to do this.  Sorry!
  • 1.32 - Added gnome-control-center for default app picker, seems to be reliable across Mint 12 and Mint Debian
  • 1.4 - changed how applet directory is located, so applet works whether in .local or /usr folders
  • 1.5 - implemented settings provider, now automatically detects changes in settings, updates applet.  Also, applet settings are stored in ~/.cinnamon/search-box@mtwebster/providers.conf
  • 2.0 - implemented settings UI - you now change settings directly in the applet, from the context menu.  For now, you still add your own providers via the providers.conf file in ~/.cinnamon/search-box@mtwebster/.

About The Author

mtwebster

Open-source software tinkerer - Android, Linux, Windows

Cinnamon applets:

  • Internet Search Box
  • Screensaver Inhibitor
  • Places with Terminal
  • CPU Frequency Selector
  • Expo-Button

22 Comments

  1. RobinHood2014 says:

    4 months ago

    Upon further investigation through Cinnamon's Looking Glass, I've discovered the problem to be in the applet.js file. Looking Glass output reads as follows: error t=2014-07-18T16:41:18Z [Applet "search-box@mtwebster"]: Error importing applet.js from search-box@mtwebster error t=2014-07-18T16:41:18Z Could not load applet search-box@mtwebster Can we expect a fix anytime soon or is this applet effectively retired?

  2. RobinHood2014 says:

    4 months ago

    Same problem as tyler. It doesn't work for me either... I can't get it to come up on the panel at all. Cinnamon version 2.2.13. "~/.Cinnamon" doesn't exist.

  3. tyler says:

    8 months ago

    I installed from the Applets menu and then tried downloading and extracting to ~/.local/share/cinnamon/applets/ It sees it and "adds" it but I cannot see it on the panel anywhere! I've got Cinnamon 2.0.14 - I don't have a ~/.Cinnamon/ directory

  4. bwsmith25 says:

    2 years ago

    Great app! Is there any way to create a keyboard shortcut that will launch the search bar? If so, how would I accomplish that?

  5. mtwebster says:

    2 years ago

    CaptainMark: Good idea - I'll see what can be done

  6. CaptainMark says:

    2 years ago

    Brilliant applet, might I recommend allowing users to tie a keyboard shortcut to it

  7. mtwebster says:

    2 years ago

    miketwebster@gmail.com Not sure how much I can help - I'm sort of a blind man stumbling his way through a china shop at this point, but I'll try. :P

  8. bownz says:

    2 years ago

    MT, Question, would you consider helping me with something? Please email me at bendloveless@gmail.com or give me your email if so. :) Thanks.

  9. mtwebster says:

    2 years ago

    Added some better commenting and explanations on my github: https://github.com/mtwebster/search-box

  10. mtwebster says:

    2 years ago

    I wanted to avoid needing that extra click to capture focus so you could start typing, otherwise I could do a 'tooltip' type thing in the text box to start out. I've updated this applet to use a new settings provider class I made up, feel free to use it, comment on it, (or ridicule!) - it's not complete by any stretch, but a start - hopefully sometime down the road I can get it included in the Cinnamon js libraries if it passes muster.

  11. mbokil says:

    2 years ago

    Have u considered putting a placeholder text inside of the textbox instead of the label? Maybe with a light opacity the provider name. When User clicks text is removed. It could free up space on panel.

  12. mbokil says:

    2 years ago

    @mtwebster - I have been thinking of following the spec. Mozilla uses. Apps reside in system folder and user preferences and browser app data is saved locally. This makes it easier for people to install/remove things and you wouldn't need sudo priviledge. I have been thinking that on first run the app makes a directory in .local.

  13. mtwebster says:

    2 years ago

    I made the editor use gksudo to avoid this - not ideal, but I've got the beginnings of a settings standard for applets percolating in my brain.

  14. mbokil says:

    2 years ago

    @bimsebasse PPA installing into /usr/share/cinnamon/applets/ might cause some problems with applets trying to write to config and properties files. Possibly the applets could still write to .local for persisting properties/config.

  15. mtwebster says:

    2 years ago

    Try latest version - should work now regardless of where applet is located.

  16. bimsebasse says:

    2 years ago

    Ah, it's because the PPA installs into /usr/share/cinnamon/applets/ and the applet.js looks for the providers.conf in the local user directory. How do I edit this line:
    --
    const PROVIDER_FILE = GLib.build_filenamev([global.userdatadir, 'applets/search-box@mtwebster/providers.conf']);
    --
    ... so that it looks in the root dir instead?

  17. mtwebster says:

    2 years ago

    Hmm working for me in Mint 12 (Ubuntu) as well as Mint Debian - anything in looking glass?

  18. bimsebasse says:

    2 years ago

    The current version (1.3) doesn't work in Mint 12, nothing shows up in the panel.

  19. bimsebasse says:

    2 years ago

    Added to Cinnamon Extras PPA:
    --
    sudo add-apt-repository ppa:bimsebasse/cinnamonextras
    sudo apt-get update && sudo apt-get install cinnamon-applet-internetsearch
    --

  20. bimsebasse says:

    2 years ago

    Nice! One thing: there is no need for a looking glass icon outside the search field in the popup menu when there already is a looking glass icon inside the search field - it looks weird.

  21. mbokil says:

    2 years ago

    Nice applet. I like the way you used the BoxLayout to keep everything native Cinnamon. Very slick. I had two small issues. For some reason sensible-browser was not pulling up Firefox correctly on my Ubuntu box. I switched it to xdg-open command. Also I felt the applet takes up too much space in the panel and I commented out your label and set it to the find symbolic icon so it blends in with alternative themes better. I appreciate your work.

  22. bownz says:

    2 years ago

    Bravo! I've been thinking about this for awhile. You should Make it like spotlight on the mac and have the option at the bottom/if no results "Search on *insert search engine*" I love this. thank you.