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

Is there a method to disable the pwsh color setting? #11043

Closed
chenyj796 opened this issue Nov 12, 2019 · 5 comments
Closed

Is there a method to disable the pwsh color setting? #11043

chenyj796 opened this issue Nov 12, 2019 · 5 comments
Labels
Issue-Enhancement the issue is more of a feature request than a bug Resolution-Answered The question is answered. WG-Interactive-Console the console experience

Comments

@chenyj796
Copy link

Summary of the new feature/enhancement

I use xshell and always set the background to white.
When I start pwsh on Linux, the command forecolor is yellow which is very illegible.
How can I disable the color setting of pwsh?

image

Proposed technical implementation details (optional)

@chenyj796 chenyj796 added the Issue-Enhancement the issue is more of a feature request than a bug label Nov 12, 2019
@iSazonov iSazonov added the WG-Interactive-Console the console experience label Nov 12, 2019
@iSazonov
Copy link
Collaborator

You could temporary set colors with $host.ui.RawUI

@vexx32
Copy link
Collaborator

vexx32 commented Nov 12, 2019

Either that or Set-PSReadLineOption can set the color values used; you can recolor them to something more readable for you or just set any annoying colors back to grey/black.

You can put lines in your $profile script to set these values semi-persistently.

@lzybkr
Copy link
Member

lzybkr commented Nov 12, 2019

Ideally a light background can be detected automatically and colors adjusted automatically. See PowerShell/PSReadLine#464 for more info.

@chenyj796
Copy link
Author

@vexx32 Thanks.

The Set-PSReadLineOption works.

@iSazonov iSazonov added the Resolution-Answered The question is answered. label Nov 13, 2019
@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Mar 26, 2022

How, exactly, did you manage to disable all colour for PowerShell? I have the colours of my terminal configured so that they are solely black-and-white, but this causes:

┌───────────────────────────────────────────────────────────────────── AlsaMixer v1.2.6 ──────────────────────────────────────────────────────────────────────┐
│ Card: HDA ATI HDMI                                                                                                                  F1:  Help               │
│ Chip: ATI R6xx HDMI                                                                                                                 F2:  System information │
│ View: F3: Playback  F4: Capture  F5:[All]                                                                                           F6:  Select sound card  │
│ Item: S/PDIF                                                                                                                        Esc: Exit               │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                      ┌──┐     ┌──┐     ┌──┐     ┌──┐     ┌──┐     ┌──┐                                                      │
│                                                      │OO│     │OO│     │OO│     │OO│     │OO│     │OO│                                                      │
│                                                      └──┘     └──┘     └──┘     └──┘     └──┘     └──┘                                                      │
│                                                   < S/PDIF >S/PDIF 1 S/PDIF 2 S/PDIF 3 S/PDIF 4 S/PDIF 5                                                    │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

...which is the consequence of invocation of "alsamixer -c0 --view=All", to be illegible to me, because it becomes:

┌───────────────────────────────────────────────────────────────────── AlsaMixer v1.2.6 ──────────────────────────────────────────────────────────────────────┐
│ Card: HDA ATI HDMI                                                                                                                  F1:  Help               │
│ Chip: ATI R6xx HDMI                                                                                                                 F2:  System information │
│ View: F3: Playback  F4: Capture  F5:[All]                                                                                           F6:  Select sound card  │
│ Item: S/PDIF                                                                                                                        Esc: Exit               │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                      ┌──┐     ┌──┐     ┌──┐     ┌──┐     ┌──┐     ┌──┐                                                      │
│                                                      │██│     │██│     │██│     │██│     │██│     │██│                                                      │
│                                                      └──┘     └──┘     └──┘     └──┘     └──┘     └──┘                                                      │
│                                                   ████████ █████████ ████████ ████████ ████████ ████████                                                    │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
│                                                                                                                                                             │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

"TERM=xterm-mono" and "unset LS-COLORS" via http://git.savannah.gnu.org/cgit/bash.git remediates this problem, but PowerShell does not accept this instruction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement the issue is more of a feature request than a bug Resolution-Answered The question is answered. WG-Interactive-Console the console experience
Projects
None yet
Development

No branches or pull requests

5 participants