Wallace
Wallace

Reputation: 17379

Different PowerShell colors for different Windows Terminal profiles (light and dark)

I have two different Windows Terminal profiles for PowerShell Core -- one with a dark color scheme, one with a light color scheme. This generally works well, except in the common case of running dir. Notice, for example, the colors of the folder names make the names difficult to read in the case of the light-themed window.

Dark PowerShell window

Light PowerShell window

I am trying to get the coloring right in both versions.

When I type Get-PSReadLineOption, I see the following:

enter image description here

As you can see, the colors are generally nice and readable in the dark window, but not as much in the light window.

Question

What do I need to do (and understand) to get the colors right in this scenario? For example, should I tell Windows Terminal to use a different PowerShell profile for different Windows Terminal profile? How do I do that? Or is there some environment variable I can check in the Microsoft.PowerShell_profile.ps1 to determine how to set PSReadLineOptions? Or is there some other approach?

Upvotes: 0

Views: 1471

Answers (1)

zadjii
zadjii

Reputation: 684

I'm not sure there's a way to have different PsReadline colors for light vs dark theme, but I'd take a look at:

Configuring a light colored theme

That should at least help the light theme be more legible.

Upvotes: 1

Related Questions