1

I've read the docs about conemu regarding the switch -new_console but I find the syntax pretty confusing and I'm not sure how to create the exact grid layouts I want to.

Here's what I've got so far, consider this script run.cmd:

cmd /c server_0.cmd -new_console:sV
cmd /c microservice_0.cmd -new_console:sV
cmd /c microservice_1.cmd -new_console:sV
cmd /c microservice_2.cmd -new_console:sV
cmd /c docker_1.cmd -new_console:sV
cmd /c docker_2.cmd -new_console:sV

When i run run.cmd with conemu the grid layout will look like this (6x1):

--------------
invoker
--------------
server_0
--------------
microservice_0
--------------
microservice_1
--------------
microservice_2
--------------
docker_1
--------------
docker_2
--------------

How can i tweak run.cmd in a way that will create a new conemu terminal with below arrangement?

--------------------------------------------
                 server_0
--------------------------------------------
microservice_0|microservice_1|microservice_2
--------------------------------------------
docker_1            |          docker_2
--------------------------------------------

Is it possible? If it wasn't possible the above, maybe something like a 3x2 grid would be also nice:

--------------------------------
server_0       |  microservice_0
--------------------------------
microservice_1 |  microservice_2
--------------------------------
docker_1       |  docker_2
--------------------------------

In any case, reason why I'm asking this is because I'd like to have this arrangement fullscreen on 2nd screen so I'll be able to see the logs at once. Also, the reason why I want all of them in a new conemu terminal is because that way I can close all of them at once and spawn them again if i need to.

Last but not least, if there is a better way (that uses conemu best practices), please share... i was thinking maybe this should become a task instead having living in a script (where i need to cd to that directory, spawn it manually, etc...)

Thanks in advance!

BPL
  • 9,632
  • 9
  • 59
  • 117

1 Answers1

2

The best way I think is to create a new task in the settings and importing there the current tabs.
And yes, the desired geometry is possible. You can create it easily, but it's not so intuitive in the beginning.
To do it you've to right-click on a tab and then you can see this menu:

enter image description here

It's most easy to create first the rows and divide the windows in each row then, else you might be stuck if you want to add a row above is not possible with the limited options in the menu.
This way you can create your desired geometry like you can see:

enter image description here

When you're satisfied with your windows you can open the settings and save your current configuration:

enter image description here

enter image description here

clicking the marked button imports then all your tabs with settings:

enter image description here

Saving the settings, is storing this Task in the file ConEmu.xml and is always available as option to select:

enter image description here

If you want to create a different script to configure conemenu you can read the settings in the xml-file from the created task including all the configuration:

enter image description here

The advantage in doing it with this visual help is that you can configure each window directly with the correct terminal (and perhaps even further settings), and that's saved together with the geometrical settings.

If you want it reduced really to the commands like in your question then I'd propose this page

David
  • 5,882
  • 3
  • 33
  • 44
  • This answer and it's pretty awesome and it solves almost the whole puzzle. In the past days one workaroudn was calling a master.cmd file that would invoke sub .cmd files (one per task) and i was configuring the layout in that script manually and then calling this master.cmd in the settings. Your way it's much better! One question still remains though, is it possible to run multiple command on each current terminal without calling any additional script? For instance, imagine I want to activate a virtualenv + running the server... Would it be possible to do that in the task settings? – BPL Jul 14 '22 at 06:00
  • Thanks, glad that you like the answer! I think you can concatenate different commands with `&` or `&&` but I've no experience with it, actually I know the program by your question only. But I tried it now and think I will use it too! – David Jul 14 '22 at 06:36
  • Some variables are already set, have a look in the file, for me it's like this: `` Likely you can optimize the settings directly in the file and just restart the program then. – David Jul 14 '22 at 06:43