Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set tab color in command line #8075

Closed
alisd23 opened this issue Oct 28, 2020 · 4 comments · Fixed by #8102
Closed

Set tab color in command line #8075

alisd23 opened this issue Oct 28, 2020 · 4 comments · Fixed by #8102
Labels
Area-Commandline wt.exe's commandline arguments good first issue This is a fix that might be easier for someone to do as a first contribution Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@alisd23
Copy link

alisd23 commented 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"
@alisd23 alisd23 added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Oct 28, 2020
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 28, 2020
@zadjii-msft
Copy link
Member

zadjii-msft commented 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 zadjii-msft added Area-Commandline wt.exe's commandline arguments Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Oct 28, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 28, 2020
@zadjii-msft zadjii-msft added good first issue This is a fix that might be easier for someone to do as a first contribution Help Wanted We encourage anyone to jump in on these. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Oct 28, 2020
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Oct 28, 2020
@Don-Vito
Copy link
Contributor

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

@alisd23
Copy link
Author

alisd23 commented 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!

@ghost ghost added the In-PR This issue has a related PR label Oct 30, 2020
@Don-Vito
Copy link
Contributor

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

@ghost ghost closed this as completed in #8102 Nov 20, 2020
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Nov 20, 2020
ghost pushed a commit that referenced this issue Nov 20, 2020
* Add a tabColor parameter to the `new-tab` and `split-panes` command
* Add --tabColor to the command line, to allow bootstrapping with tabs
  of different colors

Add another field to NewTerminalArgs. Use this field to set
StartingTabColor in Terminal. This color gets overridden by the color
defined by the profile / VT, however can be overridden with the color
picker.

Since the color is the property of the Terminal, when defined for the
tab this color is associated only with the first pane/terminal of the
tab. Additional panes will not inherit this color (to prevent advanced
resolution, where we need to resolve between the inherited color and the
one specified for the pane).

## Validation Steps Performed
* UT for parameters parsing
* Running system with several tabs of different colors.
* Adding custom actions with colors
* Performing operations like split pane, duplicate and so on

Closes #8075
mpela81 pushed a commit to mpela81/terminal that referenced this issue Nov 22, 2020
* Add a tabColor parameter to the `new-tab` and `split-panes` command
* Add --tabColor to the command line, to allow bootstrapping with tabs
  of different colors

Add another field to NewTerminalArgs. Use this field to set
StartingTabColor in Terminal. This color gets overridden by the color
defined by the profile / VT, however can be overridden with the color
picker.

Since the color is the property of the Terminal, when defined for the
tab this color is associated only with the first pane/terminal of the
tab. Additional panes will not inherit this color (to prevent advanced
resolution, where we need to resolve between the inherited color and the
one specified for the pane).

## Validation Steps Performed
* UT for parameters parsing
* Running system with several tabs of different colors.
* Adding custom actions with colors
* Performing operations like split pane, duplicate and so on

Closes microsoft#8075
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Commandline wt.exe's commandline arguments good first issue This is a fix that might be easier for someone to do as a first contribution Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants