Terminal: Set tab color in command line

Created on 28 Oct 2020  路  4Comments  路  Source: microsoft/terminal

Description of the new feature/enhancement

When opening tabs/panes with the wt command, It would be great to be able to set the color of a tab, in a similar way as we can currently set the title with wt --title something.

I use the wt to command to open my terminal "workspace", and I use colours to easily distinguish the different tabs, so allowing this to be set by command line instead of manually each time the tabs are opened would be even nicer.

This could be as simple as something like the following, allow a hex value to be set:

wt --color "#111111" ; new-tab --color "#FF0000"
Area-Commandline Easy Starter Help Wanted Issue-Task Product-Terminal Resolution-Fix-Committed

Most helpful comment

This isn't a bad idea. We've already got tabColor in the profile, might as well be able to override that from the commandline. We've already got the precedent with --title for tabTitle. Thanks for the request!

I'd probably make this --tabColor, for parity with the setting in the profile, and I probably wouldn't give it a short version. I think this should probably be an acceptable arg for split-pane, and just update the NewTerminalArgs to also accept the optional color.

All 4 comments

This isn't a bad idea. We've already got tabColor in the profile, might as well be able to override that from the commandline. We've already got the precedent with --title for tabTitle. Thanks for the request!

I'd probably make this --tabColor, for parity with the setting in the profile, and I probably wouldn't give it a short version. I think this should probably be an acceptable arg for split-pane, and just update the NewTerminalArgs to also accept the optional color.

@alisd23 - do you plan to implement this? If not I can work on this - sounds quite useful and straightforward.

@alisd23 - do you plan to implement this? If not I can work on this - sounds quite useful and straightforward.

Hey, I don't really have enough time at the moment so I won't be able to any time soon, so please go ahead - that'd be great!

@zadjii-msft - I added an optional tab color to the NewTerminalArgs, and used it to override terminal settings.... and it was a very bad decision on my side 馃槅. I mean everything worked but then during the testing I noticed that the color disappears after splitting the pane, or reloading the settings. This was a very hard way (aka at least an hour of my life) to learn that there is a runtime tab color :smile:. So I switched to setting it.

@zadjii-msft - Can you explain why we would want to use it for split-pane? I can understand why we might want it for duplicate tab though.

Was this page helpful?
0 / 5 - 0 ratings