It depends on the program. Most of these "main" window settings (or, more precisely, "document" window settings) are sort of hardcoded. I believe they use what Apple provides in their window management frameworks, like for example Preview.app.
For most apps, only the NSWindow
properties of auxiliary windows are stored in the program's Property Lists, while the document window settings may be stored somewhere else. This is what Chrome does, since it is cross-platform and uses a shared preferences format across multiple computers.
For example, com.macromates.textmate.plist
has the following entry:
NSWindow Frame New File Sheet
568 932 386 209 0 0 1920 1178
You can change these, and I believe they use rectangle coordinates and origins for representation, the first four values being the NSRect
:
- top left X coordinate
- top left Y coordinate
- width
- height
TextMate does store its main window position under OakDocumentWindowFrame
, but as I already mentioned, this is not the case for all document-based applications.
Google Chrome uses its own way of dealing with this, namely in a JSON file. It has a window_placement
setting, and you can find it in:
~/Library/Application Support/Google/Chrome/Default/Preferences
Here's what it looks like:
"window_placement": {
"always_on_top": false,
"bottom": 1046,
"left": 0,
"maximized": false,
"right": 1680,
"top": 22,
"work_area_bottom": 1046,
"work_area_left": 0,
"work_area_right": 1680,
"work_area_top": 22
},
FYI - Chrome has command line switches you can use to set the window size and position: --window-position=x,y and --window-size=w,h
– cwd – 2012-06-22T23:01:13.710