8

I was just wondering if there is a way to reset app windows like Mail or Finder to there default size and position. Is this possible and so yes, how?

Thanks in advance.

2 Answers 2

6

Window size preferences are generally stored in the .plist files found in /HD/Users/YourName/Library/Preferences

You may need to enable hidden files by using: defaults write com.apple.finder AppleShowAllFiles YES in command line, followed by a relaunch of Finder.

As an example, for Finder the file is called com.apple.finder.plist and the window state information is under the key WindowState for each different type of finder window (e.g. standard folder, searchview...) Other applications have similar naming (ctrl+F is your friend here!), e.g. the Fontbook app uses the NSWindowFrame key.

You should be able to safely remove the window state information as it get auto read from defaults database anyway.

Finder .plist

Having said all that, this doesn't appear to work for a few applications such as Maps and Mail (which is what you want unfortunately). But hey, it's a start.

(Also apologies for the lack of codeblocks, they are refusing to show up for some reason)

6
  • Correct me if I'm wrong. Changes made this way are not saved/reflected "as the ASCII format is a subset of the binary representation." Commented Jul 11, 2015 at 15:23
  • Sorry,I'm not entirely sure what you mean by "as the ASCII format is a subset of the binary representation." I've tried modifying the .plist files on a a couple of applications (Finder being one of them) it appears to work as expected
    – xyzen
    Commented Jul 11, 2015 at 23:51
  • Open the plist with text editor and you will see the quote. Do u have to restart for changes to take effect? Commented Jul 12, 2015 at 16:53
  • 2
    Aah I see what you mean, sorry I had opened it with XCode without realising. I'm not sure how you can edit the .plist files in prefs with a text editor, it appears to make it unreadable if you save it back. If you don't have/don't want to get XCode you could most likely remove your .plist file safely, but you will loose a whole lot of other settings. Also, no, you do not have to restart your OS, just the application.
    – xyzen
    Commented Jul 13, 2015 at 1:01
  • 1
    macissues.com/2014/03/25/… Commented Jul 13, 2015 at 4:29
1

For the Mail app, I found that it stores its window size and position in ~/Library/Containers/com.apple.mail/Data/Library/Saved Application State/com.apple.mail.savedState/windows.plist

More generally, I've used the following command to find any setting files in ~/Library that contains some kind of window position information:

find ~/Library -type f -name '*.plist' -exec grep -E 'NSWindow ?Frame' {} +

This is because usually this is stored in a plist file under a key NSWindowFrame or NSWindow Frame

This shows that there's typically 4 places to find the window information preferences:

  • ~/Library/Preferences/{appId}.plist
  • ~/Library/Saved Application State/{appId}.savedState/windows.plist
  • ~/Library/Containers/{appId}/Data/Library/Preferences/{appId}.plist
  • ~/Library/Containers/{appId}/Data/Library/Saved Application State/{appId}.savedState/windows.plist

Where {appId} is the App ID aka bundle identifier, e.g. com.apple.mail for Apple Mail.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .