I'd like for results from the search toolbar to open in a new tab by default, like I've configured in Firefox. How can I get this same default behavior in Safari? I already know that Command-Enter will do this for me, but I want to change the default behavior so that I don't have to hold down Command every time I do a search.
Safari MacOS – Make Safari Open Search Results in New Tab by Default
macossafarisearch
Best Answer
If you're in to some work, then Glims with a custom search provider, and some AppleScript to create your own protocol handler (URL scheme) can do the trick. But I think pressing Command-Return is much easier. ;-)
Here's what you'd need:
Open Applications, AppleScript Editor, and paste the following:
Select menu File, Save As, and be sure to select File Format: "Application". This will create something that looks like a single application, but actually holds a folder structure.
In Finder, find the place where you saved the application, right-click it and select "Show package contents".
Find file
Contents/FileInfo.plist
and open it with a text editor.At the end, just above the last two lines
</dict></plist>
, add:Move the whole application package into, for example, Application/Utilities (to ensure Launch Services registers it).
Test in any browser, using
newwindow://http://www.google.com/search?q=abc
. If it doesn't work, then double-click the application or even rename the package, just to trigger the discovery by Launch Services again.Install the Glims plugin for Safari.
In Safari's preferences, tab sheet Glims, Search Engine List, add a new entry. Note that Glims requires the slashes after
newwindow:
. Without that, Glims would prefixhttp://
to whatever text you entered:I don't know how to change the icon that Glims shows... Also, when using this, there's no key you can hold down to not open the results in a new window.