Reset Mac OS X Windows Position after de-attaching external monitor
Solution 1
From my answer originally at Server Fault Question 7237:
When a monitor is unplugged (including the adapter as well if applicable - leaving the adapter leaves OS X thinking the monitor is still plugged in) all the Windows should move onto your main screen. Occasionally some windows (eg. Firefox) will keep their position on the very far right of the screen leaving you just enough room to grab the title bar and move it where you'd like to.
One method of arranging the Windows so you can see them (if for some reason they're staying off screen) is to change to the application that owns the window in question, hold the Option key down and choose "Arrange in Front" from the Window menu. It will then arrange all the windows of that application in a cascade from the top left of the screen.
SEcondly, there are several AppleScripts available (eg. this one at Snipplr) that will also grab every window off screen and move it on screen for you.
There is also a nifty shareware app called Stay that will help automate a lot of this for you, while there is also ControlPlane which will do much more than just notice if a monitor is disconnected and allows you to run scripts (in case you want to do more than just rearrange the windows). ControlPlane is free, but doesn't have any direct mechanism for moving windows (you have to attach it to one of the aforementioned AppleScripts).
Solution 2
You can also go to Displays and choose turn off/on mirroring and it resets the windows.
Solution 3
breeze has global and application window states. the states can be triggered using they keyboard and are resolution independent. pair this with sizeup and windowflow and you'll be set.
Solution 4
Try
Window -> cascade
Does this fix your issues ?
Solution 5
None of these worked, then I read about a trick to delete the plist file. That deleted everything including my registration for the app I was trying to gather the main window, which was open, when I last closed it.
Then I tried the following and succeeded: I changed the key MainWindowFrame to s.th. below my screen resolution, in my case:
<key>MainWindowFrame</key>
<array>
<integer>**2237**</integer>
<integer>474</integer>
<integer>834</integer>
<integer>704</integer>
</array>
to:
<key>MainWindowFrame</key>
<array>
<integer>**1000**</integer>
<integer>474</integer>
<integer>834</integer>
<integer>704</integer>
</array>
That finally did the trick!!!
Related videos on Youtube
![RedGreenCode](https://i.stack.imgur.com/6KKZL.png?s=256&g=1)
RedGreenCode
Updated on September 17, 2022Comments
-
RedGreenCode almost 2 years
Using Mac OS on multiple monitor is great, but after removing external monitor (2nd monitor) usually windows position originally on the external monitor doesn't get re-positioned to default monitor. Is there any shortcut key or utilities that can reset window position for this kind of usage?
-
Admin almost 15 yearsYou can check out serverfault.com/questions/7237/… on Server Fault as well.
-
Admin almost 10 yearsalso see the very popular queestion What Window Management Options exist for OS X?
-
-
Araxia about 12 years"Gather Windows" only affects—and is only meant to affect—the System Preferences "Display" windows.
-
Chealion about 12 years@Araxia: Fixed. Odd because I could of sworn I've used it that way before (but it definitely doesn't work that way in Lion)
-
Canadian Luke almost 12 yearsThis option is not available in OSX
-
m-p almost 12 yearsWorks for Powerpoint 14.2.1 on MacOS 10.7.4
-
Canadian Luke almost 12 yearsOK, it doesn't appear in OSX 10.6.8 apparently... Hmmm. Lucky Lion user
-
Irfan over 11 yearsYou can rearrange windows with Divvy too
-
Andy almost 10 yearsis it possible that size up is causing the windows to move to the edge of the screen when i wake up my mac?
-
harijay almost 10 yearsThe script from Snipplr worked great. I have not tried the script with X-windows applications yet, which Divvy does not seem to be able to resize.
-
Ivan Chau almost 10 yearsOn Mavericks, click that application, on menu bar, Click "Window" > "Bring All To Front"
-
rymo almost 10 yearsWith multiple displays that Snipplr script might put all the windows on a single screen. Here's a modified version that works with alternate monitor arrangements: gist.github.com/vml-rmott/94f2c05e34b82e0c12ed
-
rennat almost 9 yearswhich plist file did you edit?
-
malhal over 7 yearsthink this worked
-
Justin over 7 yearsThis is the best answer, it works on macOS Sierra too.
-
Edgar Quintero over 5 yearsUsing an AppleScript worked for me, I used github.com/bradchoate/gather-windows/blob/master/…, saved it as .scpt and double clicked on it. Pressed run and fixed.