1

Does anyone know where this string is located for Mail/Maps on Mavericks?

I looked in ~/Library/Preferences/com.apple.mail.plist and it only lists a few entries, no NSWindow Frame. Cannot find for Maps, possibly com.apple.GEO.plist? No NSWindow Frame string there either.

Also, is there a way to set their window positions, so that they always open in the specified place?

defaults write...?

1 Answer 1

2

Those are in these locations on Mavericks:

~/Library/Containers/com.apple.mail/Data/Library/Preferences
~/Library/Containers/com.apple.Maps/Data/Library/Preferences

Note the capitalization - lowercase mail, capital Maps.

To read and set window frames:

defaults read com.apple.Maps "NSWindow Frame MapMainWindow"
defaults write com.apple.Maps "NSWindow Frame MapMainWindow" '2056 137 1000 712 1920 0 1440 878'

It seems though that some apps (maybe those with AppNap) don't obey the new preferences immediately, so you may have to log out and back in. Maps in particular doesn't seem to work properly, and in Mail, the main window is in a sub key. You could, for example, do:

defaults write com.apple.mail "NSWindow Frame Compose Window" '175 36 718 779 0 0 1440 878'

to set the compose window frame. It all depends on the key you're trying to set.

5
  • thank you, i wrote out a new position for Maps, then tried logging out / restarting. It isn't remembering my pref. I'm having a problem with Maps, Mail, Calendar, Finder- they are all shifting a few inches to the right every time i open them, effectively pushing them off-screen. Any ideas why this is happening? --i have 'displays have seperate spaces' enabled, and these apps are assigned to display 2. my displays are different resolutions.
    – swis24
    Commented Dec 20, 2013 at 21:05
  • are you saying the main Mail Viewer Window pref is uneditable? I cannot find it in the plist. what does it mean that it is in a sub key?
    – swis24
    Commented Dec 20, 2013 at 21:06
  • The Mail main window state is stored in the DefaultWindowState key, but that key is a dictionary. It has a windowFrame key contained within it which is where the data is actually stored. Unfortunately defaults doesn't seem to be able to directly modify these, so it's up to you to parse the DefaultWindowState key yourself. Maps, I'm not sure. Can you do a defaults read on the Maps main window each time you launch it after it moves and see if it changes? Also, are you by chance using any applications that manipulate windows, like SizeUp, Moom, Better Touch Tool, Keyboard Maestro, etc.?
    – jstm88
    Commented Dec 21, 2013 at 15:05
  • Yes, I'm using Flexiglass, but I don't think it's affecting the apps. I did quit it though, then saved the correct coordinates for Mail in DefaultWindowState: 1680 -23 1280 969 1680 -57 1280 1002, then logged out, and it still jumps back to: 2080 -25 1280 970 1680 -57 1280 1002. On Maps, same thing. you can see, each app's window jumps 400px to the right. this effectively aligns it with the right edge if the display/space was 1680x1050, but it is only 1280x1024, so it moves it off-screen.
    – swis24
    Commented Dec 21, 2013 at 18:55
  • but the spaces of display 1 are 1680x1050.
    – swis24
    Commented Dec 21, 2013 at 19:02

You must log in to answer this question.

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