Remove the Google search box in Safari 3

Jan 18, '08 07:30:00AM

Contributed by: yogipatel

I love URL keywords in Firefox, but I use Safari. Thankfully there are a handful of Safari plug-ins that bring keyword functionality to Safari (Sogudi, Keywurl, Saft, etc). These make the search box somewhat redundant. Previous to Safari 3, we were able to remove the search bar by just deleting it from the toolbar's NIB file. This doesn't work with Safari 3, however. I did a little poking around, and figured out a way to get it to disappear.

Note: You must have Apple's developer tools installed, specifically Interface Builder. Here's what to do:

  1. Locate Safari.app in the Applications folder, control-click (or right-click) on it and choose Show Package Contents from the pop-up menu.
  2. Open Contents » Resources » English.lproj
  3. Make a backup copy of Toolbaritems.nib.
  4. Open Toolbaritems.nib; it should open in Interface Builder. The following steps are from within Interface Builder.
  5. Open the Window panel
  6. If the Inspector isn't already open, hit Shift-Command-I
  7. Select one of the location/search bar SplitViews by single-clicking on the split handle between the two fields. The location and search bar should both be highlighted.
  8. In the Inspector, uncheck Attributes » Split View » Layout » Vertical.
  9. Select the search bar only by single-clicking it. It should only highlight the search bar in blue.
  10. In the Inspector, uncheck Control » State » Enabled and check View » Drawing » Hidden.
  11. Save and quit; you're done
Because the location/search bar is a SplitView, there's going to be a little space to the right of the location bar. As far as I know this is unavoidable.

[robg adds: I haven't tested this one. I did, however, confirm with the author that he hasn't had any keychain-related issues in 10.5 (due to Safari being a signed application).]

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080112154028693