-
Now that I have your attention, let me explain what I'm really asking for, because the synopsis in the title doesn't explain it at all well. Desired behaviour: I'd like to have two shortcuts in Start Menu\Programs\Startup, or entries in HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, or whatever the FotM is for starting programs at system boot, both of which invoke my shell of choice (JPSoft's TCC.EXE) to run two batch files, but in such a way that they both wind up in the same Terminal instance. Providing a little more detail, my local NAS machine does a lot more than just spin the half dozen hard drives attached to it and serve them all up as Windows shares. Among other things it runs a lighttpd instance in a Docker container to serve up my personal web page, and it also runs my private P4 server. It's these last two that I'd like to have in the same Terminal window. I've found the ability to group TCC instances that are related into multiple tabs in a single Terminal Window as an absolutely invaluable tool, so it's a bit of an eyesore that the windows for Docker/lighttpd and P4D.EXE are separate. The sort of thing I'm thinking is to allow a shortcut/command line that starts a TCC session to have an optional instance identifier attached, and if a second TCC session is started with the same identifier, it gets put in the correct instance. Something like:
provides the instance as a GUID, and then if you start wt.exe again with the same instance GUID, it puts that session as a new tab in the already running instance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can do something like this (you may need to escape the
Did you try something like that yet? If so, I may be misunderstanding your question and it'd be super helpful if you could explain how that command would not fit what you're trying to achieve. 🙂 |
Beta Was this translation helpful? Give feedback.
There's enough information in your suggestion to get what I want. You've got the two startups as one shortcut, but I found that:
wt --window "{47D93B32-E29D-4d64-97FB-BCB46F8BCA62}" new-tab C:\Etc\TCC\tcc.exe /c F:\Docker\...
as the first shortcut and
wt --window "{47D93B32-E29D-4d64-97FB-BCB46F8BCA62}" new-tab "C:\Program Files\Perforce\DVCS\p4d.exe ..."
as the second gets the trick done. TL;DR the "-window GUID" provides exactly the behaviour I was looking for, and at that point it's just use of the
new-tab
option to open a new tab with the command running.