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

Update default color scheme #72

Closed
koistya opened this issue Jan 9, 2013 · 8 comments
Closed

Update default color scheme #72

koistya opened this issue Jan 9, 2013 · 8 comments

Comments

@koistya
Copy link

@koistya koistya commented Jan 9, 2013

Dark red color is barely visible on the dark blue background of the PowerShell window :(

C:\Projects\SiteSDK [master +0 ~1 -0]>

@dahlbyk
Copy link
Owner

@dahlbyk dahlbyk commented Jan 9, 2013

The rationale for using DarkRed is that it's the same color used by git status if colors are enabled. If you can't read the prompt, you won't be able to read the status colors either.

PowerShell's default coloring is quite strange, really... If you Write-Output $Host.UI.RawUI you'll see that ForegroundColor and BackgroundColor actually default to DarkYellow and DarkMagenta, respectively. Which render as white on blue... Very odd.

My preferred solution is to host PowerShell in Console2, which defaults to Gray on Black (and provides keyboard shortcuts and tabs and a host of other useful things).

If you prefer to use the default shell, an easy workaround is to add this to your profile:

$Host.UI.RawUI.ForegroundColor = [ConsoleColor]::Gray
$Host.UI.RawUI.BackgroundColor = [ConsoleColor]::Black
Clear-Host # Purge the blue background

Or you can pick your own posh-git colors by setting the various properties on $GitPromptSettings.

Loading

@shamglam
Copy link

@shamglam shamglam commented Jun 21, 2013

Looking at $GitPromptsettings i cannot find a setting for the dark red color used when running git status?

Loading

@dahlbyk
Copy link
Owner

@dahlbyk dahlbyk commented Jun 21, 2013

WorkingForegroundColor and UntrackedForegroundColor default to [ConsoleColor]::DarkRed

Loading

@shamglam
Copy link

@shamglam shamglam commented Jun 26, 2013

I tried changing those two values but the colors are still red in git status, the colors did change other places when setting Working and Untracked however.

Loading

@dahlbyk
Copy link
Owner

@dahlbyk dahlbyk commented Jun 26, 2013

Ah, you mean the actual git status command. Try this:

git config --global color.status.changed "bold blue"

Search for color.status.<slot> on the git config docs. The color.branch.<slot> rule shows the color options.

Loading

@dahlbyk
Copy link
Owner

@dahlbyk dahlbyk commented May 16, 2015

Pondering this today... I wonder if it would make sense for $GitPromptSettings to parse the color.branch.<slot> settings when the module loads to respect those if set, falling back on the git status defaults if not?

Loading

@dahlbyk
Copy link
Owner

@dahlbyk dahlbyk commented Jun 2, 2015

I'm finally coming around... proposed workaround: #197 (comment)

Loading

@dahlbyk
Copy link
Owner

@dahlbyk dahlbyk commented Feb 6, 2017

Fixed by #197.

Loading

@dahlbyk dahlbyk closed this Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants