Advertisement

A better Google search experience with Choosy, Keyboard Maestro and Fluid

There are so, so many things that annoy me about Google:

  1. Google can remember everything about me except that I want my search results to open in a new window.

  2. Google crappifies search results, so that instead of giving me a link to the site that it shows me, it actually gives me a link to Google itself which will redirect to the site. This makes copying the link a giant PITA as well as being slow.[1]

  3. Google insists on showing me all of this "other stuff" that it thinks I want to see, when, in fact, all I really want to see is the search results for what I looked for.

  4. Because it is loading all of this other crap, it's slower than it needs to be, and my home satellite connection is slow enough.

  5. Google tracks everything you search. Now, my searches are pretty mundane, but I don't necessarily want every search tied to my Google / Gmail account. Sure, I could logout of Google / Gmail but that's annoying too.

Then there are two problems which aren't Google's fault, but still annoy me:

  1. Safari 6 insists on using SSL to do searches, which often fails on my home Internet connection which is satellite. I cannot find any way to disable that.

  2. Safari 6 makes it impossible to see the actual URL for Google searches made from the "Unified Smart Search Field."

What I want is a really fast, efficient, anonymous search, where the results will be direct links to the sites in question. And then I want those search results to open in a new window.

I realized that I could build exactly what I wanted, using tools that I already own:

  1. Keyboard Maestro

  2. Choosy

  3. Fluid

(Spoiler alert: If you want to use a search engine such as DuckDuckGo instead of Google, you can use the same process I am going to describe below.)

Fluid

Fluid is one of my favorite apps in my "toolbelt" for making a better experience on the web. Fluid describes itself as a way to 'turn your favorite web apps into real Mac apps.' Fluid is best-known for making "site-specific" browsers, but it is also great for making a browser with specific settings, including turning Java/JavaScript/Plugins/Cookies on or off.

If you spend US$5 you can create site-specific browsers with separate cookies which is not-essential-but-nice for what I'm going to do here. (There are other features you get for your $5. See the site for more details. It's easily worth $5 even without these bonus features.)

Here's what I did in Fluid.app:

1) I created a new browser called 'Google Search' and set the homepage to http://www.google.com. A few seconds later, Fluid told me my new browser was ready, and I launched it.

Note: for some reason Fluid.app doesn't find a good icon for Google, so I searched for Google Logo icon 512 and found this one that I like and selected it in the 'Icon' field, shown above. You can change this at any time later, so if you don't want to do it now, or if you forget, don't worry.

2) As soon as my "Google Search" app launched, I changed the "User Agent" to report itself as an iPhone.

(Aside: the "user agent" tells the website you are visiting which browser you are using. If you've ever gone to a website on your iPhone and found yourself automatically redirected to a 'mobile friendly' page, it's probably because that site saw your 'User Agent' said that you were using an iPhone. If you want to see what your user agent shows, you can check your browser user-agent here.)

I want Google to think that I'm using an iPhone, because Google's search results are much 'cleaner' for iPhones than for regular browsers.

In the 'Google Search' menu, I selected "User Agent" and then the iPhone option, as shown here:

[screenshot of Fluid Browser User agent settings]

You might occasionally find that your search results direct you to a mobile version of a website, but that's a minor issue. Often times if you actually click on the link it will redirect you automatically to the 'full' version once it sees the user agent of your regular browser.

3) Under "Whitelist Preferences" I made sure that the only allowed URLs were for www.google.com not any other Google domains:

This means that any link I click on will not open in this new browser, but will be fed to my usual browser. Clicking on Google results will finally open in a new tab. In fact, they will open in another browser.

4) Under "Security Preferences" I turned off plugins, Java, JavaScript. Why? Because I don't need any of them, and disabling JavaScript will also disable Google "instant" which I don't like either. I set "Accept Cookies" to "Never" and set "Cookie Storage" to "Separate from Safari" (so I don't have to log out of Google to not have Google associate my searches with my Google account).

Changing the 'cookie storage' setting requires restarting my "Google Search" app, which I did.

Choosy

Choosy lets you create 'rules' for which browser should be used in different circumstances. I've written about Choosy before so I won't go into more detail here. The app hasn't been updated for a few years, but it still works just fine under Mountain Lion.

Under Choosy's 'Advanced' tab, I created a simple 'rule' to send all links which contain 'google.com' to my 'Google Search' browser. You can see the rule here:

Make sure that Choosy is set as your default browser. The easiest way to do that is in Safari's preferences. You can easily set Choosy's preferences to use your regular browser unless a specific rule is matched, so you'll never even notice that it is installed.

(I would just like to mention that I have written about Choosy twice now and not made any Jif-related jokes about how "Choosy Mac users choose Choosy." Wait! Oops. Too late.)

Keyboard Maestro

My admiration of Keyboard Maestro continues to grow the more I use it. I recently wrote about the automation mindset but this time I wanted something much simpler: a quick way to bring up a Google search window.

Previously, when I had wanted to search for something in Google, I would switch to Safari, create a new tab, and then start typing in the "Unified Smart Search Field" which was really only convenient if I was already in Safari. I wanted something better: anytime, anywhere, in any app, I want to be able to press a keyboard shortcut, get a prompt, type, press enter, and have the Google search results come front and center.

Keyboard Maestro makes this so easy I can't believe it has taken me this long to do it.

1) Create a new macro in Keyboard Maestro and name it whatever you want. I recommend "Google Search" because I'm extremely creative.

2) Click "New Action"

Type 'web' into the 'Action' search area (top left of image, above) and select 'Search the Web.'

Notice that the option is not called 'Search Google' – it's Search the Web. It defaults to Google, but you can change that simply by changing the URL. For example if you wanted to use DuckDuckGo you would use http://duckduckgo.com/?q=%Search%. However, make sure that your Fluid.app browser and your Choosy rule are using that domain too.

You might also notice the 'color picker' which is used for the background color of the window that Keyboard Maestro will create:

I like the default but it's a nice touch to be able to change it.

OK, this is my favorite part of this entire tip:

I never (intentionally) use the Caps Lock (aka CHOCKLOCK) key. In fact, I only ever hit it my accident. One of my favorite features of OS X was when Apple decided to let us kill the Caps Lock key by going to System Preferences.app » Keyboard and then choosing "Modifier Keys...":

Google, Inc. made some headlines when it decided not to include a Caps Lock key in its CR–48 netbook, instead using that key for a 'Search' function. I thought it was a great idea, and so I decided to replicate it on my Mac.

The first step is to set to the Caps Lock key to "No Action" as shown above. Then go back to Keyboard Maestro, and click the plus sign (+) next to "New Trigger" and choose "Device Trigger" as shown here:

Here's where you have to be a little careful: as soon as you select "Device Trigger" you should press the Caps Lock key, because if you press anything else including the trackpad or mouse button Keyboard Maestro is going to think you want to use that as the trigger. After pressing the Caps Lock key it should look something like this:

Note that if you use another keyboard (such as a Bluetooth keyboard connected to your Mac laptop) you should add a second 'trigger' for Keyboard Maestro using the Caps Lock key on that keyboard as well as the "internal" keyboard.

Putting It All Together

Now whenever I want to do a Google search, I press the Caps Lock key and type into the window. The results open in my Google Browser, and when I click on a link, it opens in my regular browser. If I want to go back to my search results, I just switch back to that app.

Although this takes a bit of initial setup, the payoff is well worth it for a better experience in the end. I have not done this yet, but you could also repeat this process for different search engines and add modifier keys (shift, option, control, command) to have Keyboard Maestro bring up different search prompts. I plan to make one of those for Google Images and Google News, both of which I search frequently.

Google icon at the top of this article courtesy of YOOtheme.


  1. If you want to keep using Safari for Google searches but want to avoid these Google-crappified links, try the Google Direct extension