How to Add Google Search and Other Search Actions to Peppermint’s Main Menu

Peppermint Menu Searching New Featured

Modern reality wants operating systems to have intelligent search functions that are not limited to the local file system but extend to the Internet, allowing us to seek information online. For example, Peppermint Linux’s startup menu allows you by default to complete searches through the DuckDuckGo search engine and seek information on its official forums.

However, there is no reason to stay limited in these options. Nor do you have to wait for third parties to give you more alternatives: if a site, any site, offers a search function, then in most cases you can integrate it in your distribution’s main menu as a new search engine – or “Search Action,” as it’s called.

The tools needed

To add new Search Actions to Peppermint’s main menu, you need three things: the ability to edit the entries in the Peppermint Linux main menu, a browser you will use to visit the sites you wish to “turn into search engines,” and a simple text editor where you will paste those site URLs and “clean” them of unnecessary “fluff,” keeping only “the search part.”

As a first step, run your favorite browser and create a new blank text file on your desktop for easy access.

Peppermint Menu Searching Tools

Search for something

If you intend to add multiple site search capabilities to your main menu, we recommend that you place the browser window and the text editor window on your screen side-by-side to make it easy to switch between them for mass copy-pasting.

Visit the first site and use a characteristic keyword or phrase that could not appear by chance as a query for a search. Try your name and surname stuck together as a single word. We used the word “maketecheasier,” which is, obviously, the three words that make up the name of our site glued as one.

Peppermint Menu Searching Search For Something

The reason for this is to be able to quickly locate this original word amidst a chaos of other characters.

Copy-paste the full URL

When the results appear on your screen, you can ignore them – strangely, it’s not the results themselves that we need but the URL that leads to them.

Peppermint Menu Searching Full Url

Copy the search results page URL from the address bar of your browser and paste it into the text editor.

The query part of the URL

Find, among the chaos of characters in the copied URL, the word you used in your search. As you can see in our picture, ours was listed twice on Google Search results, the first of the search engines we decided to add to Peppermint Linux.

Only the first of those “appearances” of our word was needed, and as you will see in practice, what you usually look for is in the form of:

The above line makes sense when you realize that “q” usually corresponds to the word “query” or “question,” so in human instead of search engine “lingo” the above would translate to:

When you pinpoint its position in the results URL, don’t do anything, only keep in mind “where it is,” as you will need it in the next steps.

Peppermint Menu Searching Query

The address part of the URL

The search phrase is the second part of the equation. The first part is the primary address of the search results page itself, which in this example is:

Keep this in mind, too, as in the next step you will have to combine those two pieces of the equation into one single entry.

Peppermint Menu Searching Address

Test the “clean” URL

In 99% of the cases, all you need to do is keep the essential search address of a site and paste the search query phase at the end, deleting anything else. Usually, the format will be:

Some sites may also use the following format:

To make sure it works, visit crafted URL after copying and pasting it into your browser’s address bar. If there is no error in the address structure, you will be presented with the same results you saw before. It should work as a “cleaned from fluff” version of the typical search results URL with only the bare essentials.

Peppermint Menu Searching Test Clean Url

More URLs

Repeat the process for all sites where you want to add search functionality to your distribution’s main menu.

In our case, and as you can see from our image, after Google we turned our attention to IMDb. We liked the idea of being able to seek movie or series titles and actor and director names directly from the main menu.

Peppermint Menu Searching More Urls

Thus, we repeated the same steps, completing a search, copying the results page URL into our text editor, and clearing it of unnecessary data, keeping only the base search URL and the “question” we “fed” it.

Edit the menu

When you have copied, “cleaned” and tried out the addresses that you would like to add to your main menu as new search engines, it is time to actually add them. Right-click on Peppermint’s main menu and from the menu that appears select “Properties.”

Peppermint Menu Searching Edit The Menu

Keep the text editor window handy on your screen, as you’ll need it in the next steps.

Add a new Search Action

Move to the last of the tabs, “Search Actions,” and click the “+” key to add a new one to the menu.

In the Name field, enter the name you want for your search entry – the name only differentiates it from the other entries and doesn’t affect how it works, so you can use whatever you want here.

In the Pattern field enter the code you want to “map” to this Search Action, that you’ll enter in the future in the search field of the main menu, to complete related search. For ease of use, we recommend using a symbol followed by one or two letters of the site name.

Peppermint Menu Searching New Search Action

For example, the default DuckDuckGo is accessible by typing “!d,” so we used the same logic, and for Google, we used “!g” and, as we’ll see later, for IMDb “!i.” In both cases our pattern would be an exclamation mark followed by the first letter of the site’s name.

Crafting the command

In the Command field, you should enter a command that will do three things:

  • Run your browser
  • “Open” the site’s page showing search results
  • “Feed” the query you entered in the main menu to this page’s URL so that it displays relevant results

The first part of this is easy: select the existing DuckDuckGo Search Action. Then, copy the first part of its command. Alternatively, you can copy it directly from here. The part you are interested in is:

Return to your entry and paste the part of the command you just copied into its Command field.

Leave the Regular expression option turned off.

Peppermint Menu Searching Command

Add the actual query

Continue copying your address from your text editor. Paste it at the end of the Command field, after the first part you copied in the previous step from either here or from DuckDuckGo’s entry. Remember to keep a space between the command you’ve already copy-pasted and the crafted URL after it.

Peppermint Menu Searching Command Query

Replace the search phrase at the end of your crafted URL with the sequence %u. The result should look like what you see in our picture. “%u” corresponds to “what the user has entered as a search query in the main menu search field.”

Setting up more Search Actions

Repeat the process by creating a new entry for each site you want to be able to search directly from the main menu.

We created a new, second listing, accessible through the “!i” sequence, which would allow us to quickly and easily complete searches on IMDb.

Peppermint Menu Searching More Search Actions

With those two new Search Actions, we’ll be able to type “!g make tech easier clipman” to search on Google for this phrase or “!i Charlize Theron” to seek info about the beloved actress on IMDb.

Instant site searching

Close the window to save the changes, and from now on you’ll be able to use the Patterns you declared for each site followed by a search request directly in the main menu’s search field.

Peppermint Menu Searching Start Menu Search

As soon as you enter an active, recognizable pattern, the main menu list will display the name you entered for it. Continue typing what you want to search for and press enter to bring up your browser, loading the relevant results page of the site you mapped to a Search Action.

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.