Skip to content

Instantly share code, notes, and snippets.

@rampion
Last active June 9, 2017 09:33
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rampion/8448220 to your computer and use it in GitHub Desktop.
Save rampion/8448220 to your computer and use it in GitHub Desktop.
How to make TextEdit.app fullscreen

Here's how I made my local copy of TextEdit.app able to work in fullscreen. This won't add a menu option, but does add the little fullscreen double arrow to the upper-right-hand corner of TextEdit windows.

If you trust me, you can just use the modified DocumentWindow.nib that's included with this gist.

sudo cp ~/Downloads/DocumentWindow.nib /Applications/TextEdit.app/Contents/Resources/DocumentWindow.nib

That's it. Now just open TextEdit, and try out fullscreen mode.


If you don't trust binary code that some stranger gave you on the internet, or just want to know how I did it, try these instructions instead. These instructions require:

  • the ability to type commands into the terminal (step 2, step 4)
  • XCode/InterfaceBuilder (step 3)
  • root privileges (step 4)

  1. First, you'll need to download an editable nib file. This will provide a wrapper that we can manipulate with XCode/InterfaceBuilder. Unzip the downloaded file, and place Compiled Nib Opener.nib somewhere convenient, like your Desktop or Downloads folder. I'll assume it's in ~/Downloads/Compiled Nib Opener.nib for the rest of these instructions.

  2. The fullscreen settings for TextEdit are in /Applications/TextEdit.app/Contents/Resources/DocumentWindow.nib, but we can't edit that directly. First, we'll need to put it in our Compiled Nib Opener.nib directory as keyedobjects.nib. This is easily done in Terminal.app:

     cp /Applications/TextEdit.app/Contents/Resources/DocumentWindow.nib ~/Downloads/Compiled\ Nib\ Opener.nib/keyedobjects.nib
    
  3. Now open up our Compiled Nib Opener.nib file with XCode/InterfaceBuilder. The entire window should be selected. If it isn't, just click the window header (with the red/yellow/green buttons). Open up the Attributes tab (fourth in the right side bar), scroll down to "Full Screen" and select "Primary Window". Save it, and close XCode.

    xcode screenshot

  4. Last, all we need to do is copy our changed keyedobjects.nib back and replace the original DocumentWindow.nib. Again, this is easily done in Terminal.app. Since DocumentWindow.nib is owned by root and write-locked, we'll need sudo.

     sudo cp ~/Downloads/Compiled\ Nib\ Opener.nib/keyedobjects.nib /Applications/TextEdit.app/Contents/Resources/DocumentWindow.nib
    

Thanks to this macworld post on what to change in DocumentWindow.nib and this video on how to edit nib files.

@dethbunny
Copy link

Just download the TextEdit source and make the changes there, then compile your own copy.

https://developer.apple.com/library/mac/samplecode/TextEdit/

@connormulcahey
Copy link

Thanks, works great!

@zhaoxiaobao
Copy link

great !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment