-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Change tab colour automatically based on tab title text using preset regex in settings #7906
Comments
Okay this is a neat idea, but I'm going to tag this up as a possible extension idea. Thanks for the suggestion! |
Yup! Excellent extension idea. Thanks! |
A suggestion, support not just the title bar color but some additional (any?) profile attributes (e.g., terminal background color, image, etc.) |
As @uishon suggested, this should cover other visuals as well, it would nicely cover my case. With multiple tabs, I'd rather rely on backgrond color or image to differentiate quickly, as tab colors just don't pop to me as much. I've been toying with a thing (see 8471 closed link above) to have background that has some noticable graphics + text (eg hostname or IP) in background-image, to help me differentiate sessions easily. Looking forward to seeing progress on this! |
Very good idea, I'm looking for a solution to do it. |
There hasn't been any progress here, or any current plan either. There's a spec that's pretty close to this over in #15700 (for #5916), but that doesn't really cover the "tab title". Otherwise, we've kinda just got this tagged up as an "extensibility" feature (though, we don't really have a plan for extensions either). Maybe someday in the future, a 3p dev could write a "terminal extension" that listens for tab title changes, and then can call some API to manually set the tab color for a control. Otherwise, I don't think we have a good idea for how to align this feature with our current settings model 🤷 |
Is there already an API to change the tab color from a powershell script ? |
There certainly is! There are probably some details around #6574 (comment) for the sequence you'd want to use |
Awesome, thank you so much for. Really appreciated :) |
Description of the new feature/enhancement
The ability to preset what colour a tab would be by what text is in the title of the tab.
I regularly have multiple tabs open to different servers but also multiple tabs open to the same server at the same time. An example tab bar could look like
me@laptop, bob@serverA, bob@serverA, bob@serverB, bob@serverC
On top of that I regularly close and open tabs to 'serverA' or 'serverB' throughout the day. So the ability to choose a colour manually for an open tab is useful but the frequency I open and close tabs means it isn't very efficient.
I'd like to be able to put a setting in the settings file that is something like
"tabColours":
{
"serverA" : "red",
"laptop" : "yellow",
"server[B,C]" : "green",
},
Then when I open a new tab and connect to serverB, the tab would automatically switch to the colour green. If I disconnected from ServerB and the Terminal session title changed back to 'me@laptop' the tab colour would auto switch to the colour yellow from green.
Proposed technical implementation details (optional)
Supporting regex pattern matching would be nice but even if it couldn't do that and was just basic static text matching would be good.
The text was updated successfully, but these errors were encountered: