Friday, January 13, 2012

Making Any OS X Application Full Screenable In Apple Lion OSX


Copy the App You probably don't want to edit the original, so copy the app to the Desktop.
Locate the compiled nib files Compiled nib files can be found in the app bundle's Contents/Resources folder. In more internationalized apps, they may appear in lproj subfolders. You need to locate the nib files you want to edit.
  1. cd whatever.app/Contents/Resources
  2. grep -iRl NSWindowBacking *
This returns a list of all nib files which define the NSWindowBacking key. That key more or less tells you that there's a window definition there. You can try to edit them all, or you can do what I did: just edited the three files in Colloquy's Resources folder that matched: JVChatWindow.nib, JVTabbedChatWindow.nib, and JVSidebarChatWindow.nib.
Convert to XML Use Apple's plutil or my plusutil to convert each nib file from a binary property list to proper XML.
plutil -convert xml1 filename.nib
Edit those XML files Once converted, open the now text-based XML files in TextEdit. Search for the NSWindowBacking key/value pair in each file. After that pair add
<key>NSWindowCollectionBehavior</key>
<integer>128</integer>
This tells the window that its behavior includes full size resizing. Save your changes and close the file.
Convert back to BPlist Convert your edited files back to a binary plist. Strictly speaking? This isn't a necessary step. It just pleases me aesthetically.
plutil -convert binary1 filename.nib
Run it With luck, your app now has full screen zooming support. Enjoy it. Make sure to back up the original app before replacing it with your edited version. And do not expect to upgrade this version, like, you know, ever.

Saturday, January 7, 2012

Remove Spotlight "developer" and "Web searches"

Here is a fix for removing the developer category from Spotlight.
  1. Go to ~/Library/Preferences/com.apple.spotlight.plist
  2. Open Terminal. You will need to convert the file to XML (from binary) so you can edit it in TextEdit. The command you need is plutil -convert xml1 ~/Library/Preferences/com.apple.spotlight.plist
  3. Open this file in TextEdit. Just before at the bottom, add the following:
    Code:
          <dict>
          <key>enabled</key>
          <false/>
          <key>name</key>
          <string>SOURCE</string>
      </dict>
    
  4. Convert the file back to binary using plutil -convert binary1 ~/Library/Preferences/com.apple.spotlight.plist
  5. Log out and back in again.