Open the windows you want to minimize first, and the other(s) afterwards.
open -a TextEdit.app ~/Documents/doc2.txt ~/Documents/doc3.txt
osascript -e 'tell application "TextEdit" to set miniaturized of every window to true'
open -a TextEdit.app ~/Documents/doc1.txt
I fixed it by going to the menu Window-->Minimize, which then brings that file back to the screen.
I saw other solutions like Window-->Zoom or Window-->Arrange all. I guess the issue can be fixed by other window-related submenus under the Window menu :-)
This AppleScript will tell the active application to minimize all windows except the active (aka frontmost) window.
set theFrontApp to (path to frontmost application as Unicode text)
tell application theFrontApp
set theWindows to the windows whose miniaturized is false
set theFrontID to the id of the front window
repeat with theWindow in ...
Unlike other answers, you don't need an app to do it.
Holding the option button, click on the green icon on the top left.
You will see the option to Tile Window to Left of the screen.
If you don't hold the option, then spaces will be divided.
One way is to use built-in way to open new window while clicking on link. ⌘ + , to open Safari preferences > Tabs and one can see following options:
So ⌘ + ⌥ + click will open link in new window and makes it active. By adding ⇧ will not make new window active.
Also - what action you call minimizing? Because I can't reproduce any sudden window opening if ...