Support random color scheme, pseudocode [ scheme = rand(settings.schemes) ]
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 .
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.
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.
Hello! This seems kind of fun. Could I give it a try?
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:
https://github.com/microsoft/terminal/blob/cdf2630204fdafc24237e5ebaf069c0b12a26aab/src/cascadia/TerminalSettingsModel/TerminalSettings.cpp#L199-L205
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.
Hi, this looks cool, can I try?
Go for it! We had someone try once before in https://github.com/microsoft/terminal/pull/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_
This is cool !! Can i try this....I believe this is still an open issue
Hey! Its my first time trying open source contribution. Can I give this a try?
Hey this issue looks fun to try. Could you please assign me this? And I'd appreciate if you could help along