In an ongoing quest for browser minimalism I have finally figured out how to remove Safari's search box from the right hand side of the location bar. With plugins like Keywurl, I have found that it is totally unnecessary and just takes up space.
You will need interface builder to do this. It is available from your OS X install DVD or as part of Xcode which you can download here.
First open your Applications folder and locate Safari. Right click on the app icon and select "Show Package Contents." Safari should be closed at this point.
Navigate to Contents/Resources/English.lproj. Locate Toolbaritems.nib and make a copy of it as a backup (Right click / Duplicate).
Now double click on the original file to open it. You should see something like this:
You can now select the little Google search boxes and delete them by hitting delete. Be aware of how you are focused on the object as clicking on it multiple times will focus on it in different ways. Just click on the box one time and hit delete. It should now look something like this:
I'd recommend not messing with anything else, but you can move the location of various items from here. Note that you can customize the toolbar to some extent in Safari itself by right clicking on it.
Save the file and close out of Interface Builder. Now open Safari and try it out! If you didn't screw anything up you should now have a nice big location bar and no search box!
If you're wondering, on the right of my location bar I have StumbleUpon icons provided by
Stumbi. The little lock is from my favorite password manager
1Password (see
my review - it is even 10x better now).
Update (May 15 2009):
This doesn't appear to work on the most recent builds of Safari. The location bar and search bar are somehow linked so you can't delete one without the other. If you're having this problem, here is the solution:
In interface builder, click once on the location bar/search box object, then click once on the search box. It should look something like this:
Hit Cmd+Shift+I to open the inspector (or open it from Tools/Inspector). The Inspector should say at the top "Web Search Field Attributes." If it says "cell" instead of "field," you've clicked down too much.
Under the view section of the inspector, hit the checkbox for "hidden." If there are multiple instances in interface builder (as above), apply this same process to all of them.