terminal icon indicating copy to clipboard operation
terminal copied to clipboard

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

Open tedli opened this issue 4 years ago • 8 comments

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 avatar Mar 09 '21 03:03 tedli

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 avatar Mar 09 '21 11:03 zadjii-msft

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.

electronic-dk avatar Mar 10 '21 08:03 electronic-dk

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

hessedoneen avatar Apr 07 '21 05:04 hessedoneen

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.

zadjii-msft avatar Apr 07 '21 10:04 zadjii-msft

Hi, this looks cool, can I try?

rachel148 avatar Sep 20 '23 10:09 rachel148

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_

zadjii-msft avatar Sep 22 '23 11:09 zadjii-msft

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

udupa-chinnu avatar Oct 17 '23 04:10 udupa-chinnu

Hey! Its my first time trying open source contribution. Can I give this a try?

KrishnaChamarthy avatar Jun 13 '25 11:06 KrishnaChamarthy

Hey this issue looks fun to try. Could you please assign me this? And I'd appreciate if you could help along

archa8 avatar Jun 23 '25 18:06 archa8