Set tab color in command line #11199

Closed
opened 2026-01-31 02:41:18 +00:00 by claunia · 4 comments
Owner

Originally created by @alisd23 on GitHub (Oct 28, 2020).

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"
Originally created by @alisd23 on GitHub (Oct 28, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # 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: ```bash wt --color "#111111" ; new-tab --color "#FF0000" ```
Author
Owner

@zadjii-msft commented on GitHub (Oct 28, 2020):

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.

@zadjii-msft commented on GitHub (Oct 28, 2020): 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.
Author
Owner

@Don-Vito commented on GitHub (Oct 28, 2020):

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

@Don-Vito commented on GitHub (Oct 28, 2020): @alisd23 - do you plan to implement this? If not I can work on this - sounds quite useful and straightforward.
Author
Owner

@alisd23 commented on GitHub (Oct 28, 2020):

@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!

@alisd23 commented on GitHub (Oct 28, 2020): > @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!
Author
Owner

@Don-Vito commented on GitHub (Oct 30, 2020):

@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 😄. 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.

@Don-Vito commented on GitHub (Oct 30, 2020): @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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11199