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

Support random color scheme, pseudocode [ scheme = rand(settings.schemes) ] #9422

Open
tedli opened this issue Mar 9, 2021 · 7 comments
Open
Labels
Area-Settings Issues related to settings and customizability, for console or terminal 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.
Milestone

Comments

@tedli
Copy link

tedli commented Mar 9, 2021

Description of the new feature/enhancement

There is a site https://windowsterminalthemes.dev/, it shares many awesome color themes. I choose some of them, pasted in settings.schemes, then I may change the colorScheme daily depends on my feeling.

The Oh-My-Zsh has a similar feature, the random theme, a theme will be chosen randomly every time a new shell is opened.

Wish Windows Terminal could have something like that.

Proposed technical implementation details (optional)

Introduce a keyword like random, if the colorScheme field is set to random, then every time a new tag or window is opened, randomly choose a color schema from settings.schemes .

@tedli tedli added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Mar 9, 2021
@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 Mar 9, 2021
@zadjii-msft
Copy link
Member

yes yes yes.

See guys? I told you I wasn't the only person who wanted this!

I'm immediately sticking this on the backlog. We'd probably want something slightly more obscure than just random, but I really love the idea. Thanks!

Oooooh or even, if you set scheme: ["foo", "bar", "baz"], we pick one at random from that list? That's a neat idea too.

@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal 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. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Mar 9, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Mar 9, 2021
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Mar 9, 2021
@electronic-dk
Copy link

Slightly off-topic: many (if not most) of the themes included on this website have secondary colors that are barely visible (e.g. usually low contrast, command arguments suffer from it most of the time) to the point that those themes are either outright unusable or require some tinkering. I wonder if it's possible to somehow detect such situations and maybe suggest alterations to the colors.

@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Mar 13, 2021
@hessedoneen
Copy link
Contributor

Hello! This seems kind of fun. Could I give it a try?

@zadjii-msft
Copy link
Member

Go for it!

For this one, I'd add a special string like _random_. If a profile's color scheme is set to that string, then when we apply the color scheme:

if (!profile.ColorSchemeName().empty())
{
if (const auto scheme = schemes.TryLookup(profile.ColorSchemeName()))
{
ApplyColorScheme(scheme);
}
}

Don't look up the scheme by name, but instead use a random one.

I'd also watch out - there's another part of the setting load code that verifies that every profile's colorScheme does in fact exsist. We'd have to adapt that code to not check if _random_ exists.

@rachel148
Copy link

Hi, this looks cool, can I try?

@zadjii-msft
Copy link
Member

Go for it! We had someone try once before in #9845. I believe that was pretty close to right. IIRC they just got caught up on making sure to not raise a warning when the scheme is set to _random_

@udupa-chinnu
Copy link

This is cool !! Can i try this....I believe this is still an open issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal 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.
Projects
Status: Should be written
Development

No branches or pull requests

7 participants