MicrosoftDocs / Console-Docs

Windows Console Docs Repo
Creative Commons Attribution 4.0 International
221 stars 84 forks source link

How to create a MxN tiled sessions #300

Closed brupelo closed 1 year ago

brupelo commented 1 year ago

Hi,

Consider this dummy command

wt -w %~n0 ^
nt --title="shared" --startingDirectory=%ALIAS_DIR% %COMMAND_SHARED% ; ^
nt --title="svc-foo-bar-baz-boo-hoo0:5000" --startingDirectory=%svc-foo-bar-baz-boo-hoo0% %COMMAND% ; ^
nt --title="svc-foo-bar-baz-boo-hoo1:5001" --startingDirectory=%svc-foo-bar-baz-boo-hoo1% %COMMAND% ; ^
nt --title="svc-foo-bar-baz-boo-hoo2:5002" --startingDirectory=%svc-foo-bar-baz-boo-hoo2% %COMMAND% ; ^
nt --title="svc-foo-bar-baz-boo-hoo3:5003" --startingDirectory=%svc-foo-bar-baz-boo-hoo3% %COMMAND% ; ^
nt --title="svc-foo-bar-baz-boo-hoo4:5004" --startingDirectory=%svc-foo-bar-baz-boo-hoo4% %COMMAND% ; ^
nt --title="svc-foo-bar-baz-boo-hoo5:5005" --startingDirectory=%svc-foo-bar-baz-boo-hoo5% %COMMAND% ; ^
nt --title="svc-foo-bar-baz-boo-hoo6:5006" --startingDirectory=%svc-foo-bar-baz-boo-hoo6% %COMMAND% ; ^
nt --title="svc-foo-bar-baz-boo-hoo7:5007" --startingDirectory=%svc-foo-bar-baz-boo-hoo7% %COMMAND% ; ^
nt --title="svc-foo-bar-baz-boo-hoo8:5008" --startingDirectory=%svc-foo-bar-baz-boo-hoo8% %COMMAND% ; ^
nt --title="svc-foo-bar-baz-boo-hoo9:5009" --startingDirectory=%svc-foo-bar-baz-boo-hoo9% %COMMAND% 

This is something i use to spawn several microservices but the problem is because the services names are too long i can't read correctly the whole title. My question, would it be possible to create a tiled arrangement (programatically) that allows me to see at once all the titles? Consider I've got the terminal maximiez on a 2nd monitor of 1920x1080.

Of course I've already tried using the concept of panes https://learn.microsoft.com/en-us/windows/terminal/panes and the command split-pane but maybe it's because I didn't full understand the syntax is the reason why I haven't managed to accomplish this task yet.

Could you please put an example of how you'd create a 4x2 tiled session where all panes are the same size? Or 2x4? Would it be possible to create programatically something such as

image

Something where 1..8 were the same size and 0 was the same width but twice the height?

Thanks in advance!

brupelo commented 1 year ago

Apologies, I've opened an issue in the wrong repo :/