Windows build number: Microsoft Windows [Version 10.0.18362.86]
Windows Terminal version (if applicable): commit bbbd3e0323a82548416f40ddba
Window position is restored to were it was in step 3 above.
Window is opened at a default location.
What if you have more than one window?
@DHowett-MSFT Good question and I realize my expectations what somewhat flawed. Currently the Windows Terminal window is opened so that half the terminal is outside of my screen bounds (I've changed the initialRows and initialCols)
When I think about it, I would want a way of setting the default window position somehow (like I can with the old fashion terminal).
There's already #766, which deals with restoring general state from the previous session. I'd say much of this issue fits under that umbrella, save for:
I would want a way of setting the default window position somehow (like I can with the old fashion terminal).
Shockingly, I don't think we have an issue tracking that particular feature request quite yet. This is now the thread tracking that feature request.
Personally, I prefer even having multiple instances being restored to the very same pixel position and size rather than stacking them pseudo-randomly over my desktop.
Tastes are different, so why not add an option like:
{
"windowRestoreMode": "lastPositionAndSize"
}
With windowRestoreMode being an enum of values like:
none — Do nothing, let Windows place automatically.lastPositionAndSize — Restore pixel-perfect both in position and size, no matter whether docked before (just like I described in #1420)Personally, I prefer even having multiple instances being restored to the very same pixel position and size rather than stacking them pseudo-randomly over my desktop.
Tastes are different, so why not add an option like:
{ "windowRestoreMode": "lastPositionAndSize" }With
windowRestoreModebeing an enum of values like:
none— Do nothing, let Windows place automatically.lastPositionAndSize— Restore pixel-perfect both in position and size, no matter whether docked before (just like I described in #1420)- Possibly more modes…
"Possibly more modes" should also include a predefined position on screen in pixels, imho.
Sounds very good, @lllopo.
For your defindedPositionAndSize mode, one could enhance this like e.g.:
{
"windowRestoreMode": "definedPositionAndSize",
"windowPos":
{
"x": 100,
"y": 120,
"width": 400,
"height": 800
}
}
One could even enhance this for multiple intances of Terminal to each use another set of positions/sizes like:
{
"windowRestoreMode": "definedPositionAndSize",
"windowPos":
[
{
"isDefault": true,
"x": 100,
"y": 120,
"width": 400,
"height": 800
},
{
"x": 500,
"y": 120,
"width": 400,
"height": 800
},
{
"x": 900,
"y": 120,
"width": 400,
"height": 800
}
]
}
I.e. the first instance use the first object of position and size in the windowPos array, the second instance of Terminal uses the second object in the array, and so on.
For following instances with no representation in the windowPos array, an entry with "isDefault": true is searched, or if none is found, the first entry is being used.
Just one more discovery:
Visual Studio Code starts the first instance pixel-perfect as it was closed before. When starting a second instance, it starts it as some default position and size.
Not as advanced as my suggestion, but way better than Terminal doing now.
:tada:This issue was addressed in #2817, which has now been successfully released as Windows Terminal Preview v0.6.2951.0.:tada:
Handy links:
What if you have more than one window?
More than one window is great in multiple monitor arrangements and I'd still like to have control over where they open and the their size on each display. For multiple terminals on one display I'd prefer to have a tab feature in one window or use WTs splitPane function rather than separate windows.
Most helpful comment
Personally, I prefer even having multiple instances being restored to the very same pixel position and size rather than stacking them pseudo-randomly over my desktop.
Tastes are different, so why not add an option like:
With
windowRestoreModebeing an enum of values like:none— Do nothing, let Windows place automatically.lastPositionAndSize— Restore pixel-perfect both in position and size, no matter whether docked before (just like I described in #1420)