Hackinations: Making any OS X app full-screenable in Lion
Today, Steve Sande begged me to add a full-screen button to Colloquy. He offered me chocolate and kittens, neither of which is particularly good for me. But he's a good guy and I like him and his wife so I went ahead and figured this out. [Editor's note: Actually, she was offered chocolate-covered kittens, not chocolate and kittens.]
I am so warning you: if you are not comfortable at the command line, just skip on to the next post.
Seriously.
Still here? Let's go then.
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.
- cd whatever.app/Contents/Resources
- 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.

UPDATE: If you don't mind installing SIMBL, a system level bundle loader, you can check out chpwn's well-received maximizer app as well. SIMBL allows you to enhance existing applications with new functionality and features.
Share
Source: http://tuaw.com/tag/hackinations
Categories
Today, Steve Sande begged me to add a full-screen button to Colloquy. He offered me chocolate and kittens, neither of which is...
Add a Comment
What files did you edit in Skype to make it work? I could only find two which were not in lproj folders and after editing those my Skype wouldn't start. One was ChatDebugConsole.nib and the other FeedbackWindow.nib.
September 22 2011 at 4:04 PM Report abuse Permalink rate up rate down ReplyThis method works with Evernote... It's great! but It doesn't work with Miro (May because It's written by Python)
July 27 2011 at 7:37 AM Report abuse Permalink rate up rate down ReplyGreat! Used this to make Skype fullscreen... Finally the single window UI of the new Skype for Mac makes some kind of sense... I mean it uses half the screen anyway, so why not make it fullscreen. ;)
July 27 2011 at 6:37 AM Report abuse Permalink rate up rate down ReplyHow do you make this? plutil kills my Skype at all.
July 28 2011 at 2:14 AM Report abuse Permalink rate up rate down ReplyWhat do you mean by plutil kills your Skype?
Plutil is only used to convert the nib files inside the Skype app bundle.
What files did you edit in Skype to make it work? I could only find two which were not in lproj folders and after editing those my Skype wouldn't start. One was ChatDebugConsole.nib and the other FeedbackWindow.nib.
September 22 2011 at 4:05 PM Report abuse Permalink rate up rate down ReplyThis seems to work better for me than Maximizer, I tried both ways and although Maximizer will enable full screen for Firefox and Thunderbird which I couldn't get this method to work with I found more issues with stray windows and empty spaces with Maximizer.
July 26 2011 at 2:59 PM Report abuse Permalink rate up rate down Replydarn, it doesn't work with MacVim. it only had one instance of NSWindowBacking, in a nib called FindAndReplace.nib. I made the change there. after launching, moving the mouse to the upper right of the window border caused the mouse cursor to change to the full screen cursor, but clicking didn't actually cause MacVim to go full screen.
MacVim has implemented the bad old way of full screen (drawing a window that fills the whole screen). hopefully they'll update that code to the new Lion fullscreen APIs!
Thanks for this tip, though, it's exciting!
Nice!
Worked great for me in Outlook 2011 (/enlproj/mainwindow.nib/keyedobjects.nib) and Coda (tsdocument.nib)
By the way, plutil -convert XML1 filename.nib should have the XML in lowercase, so should read plutil -convert xml1 filename.nib
July 26 2011 at 5:57 AM Report abuse Permalink +2 rate up rate down ReplyCertain applications like simple comic are going to have to be updated to be full screen compatible because simply updating the nib files or using a simbl plugin works but causes a lot of bugs with how they operate when in full screen. I previously before seeing this article tried to download the source code for simple comic and toggle the preference for having a window full screen able in the .xib files in xcode but I noticed this when I compiled the application and when I tried it with the simbl plugin it gave me the same behavior.
July 25 2011 at 10:16 PM Report abuse Permalink rate up rate down ReplyI was about to point out SIMBL and chpwn's Maximizer before I saw the update to the article, but I do want to warn people that it seems to cause a few incompatibilities with certain programs, particularly programs that are already full screen mode compatible. I particularly had some problems with iPhoto in full screen mode. I uninstalled Maximizer/SIMBL and things went back to working.
July 25 2011 at 8:44 PM Report abuse Permalink rate up rate down ReplyI noticed problems with Safari as well. Opening a new tab on a full screen Safari window with no other open tabs causes a weird issue and throws everything out of whack. The only work around is to back out to the desktop, then re-enter full screen mode.
I, too, removed SIMBL and Maximizer, which fixed the problem in Safari. There were only a few apps I wanted Full Screen mode for anyway, like Spotify and Firefox. Erica's solution is good, but I'm hoping chpwn's plugin will allow for a whitelist in the future, letting specify explicitly which apps should (and should not) use the plugin.
My main complaint about full screen mode in Lion is that it is not optimized for dual display.
The app is maximized on the main display, but the 2nd display is blank and useless. As a developer, I'd expect to put some tool windows on the 2nd monitor, such as Xcode organizer or iOS simulator. But can't.
Yep. For this reason, I never use full screen mode. I think it's really really dumb how they implemented it.
July 26 2011 at 12:50 AM Report abuse Permalink rate up rate down ReplyThat's something I hope will be fixed in 10.7.1, and asap. Safari just *begs* to be placed full screen on a dedicated monitor, but you can't have it block out the other in the process. That's just loopy. I pray this is just a temporary oversight and not an Apple "feature."
July 26 2011 at 1:11 PM Report abuse Permalink rate up rate down ReplyDeals of the Day
more deals- Acoustic Research Digital Photo Frame with iPod Dock for $50 + free shipping
- Apple iPhone 4 8GB for Verizon, AT&T, or Sprint for $50 + pickup at Best Buy
- Unlocked iPhone 4S 16GB for GSM (AT&T, T-Mobile) for $619 + free shipping
- Apple iMac Core i7 Quad 3.4GHz 27" w/ 24GB RAM, 2TB HDD for $2,677 + $29 s&h
- Used Apple Magic Mouse for $36 + $4 s&h
- 9-Piece iPhone Bundle, includes 1,900mAh battery for $8 + free shipping
20 Comments