Custom Posh-Git prompt
# Background colors | |
$GitPromptSettings.AfterBackgroundColor = "DarkBlue" | |
$GitPromptSettings.AfterStashBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.BeforeBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.BeforeIndexBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.BeforeStashBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.BranchAheadStatusBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.BranchBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.BranchBehindAndAheadStatusBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.BranchBehindStatusBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.BranchIdenticalStatusToBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.DelimBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.IndexBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.LocalDefaultStatusBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.LocalStagedStatusBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.LocalWorkingStatusBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.StashBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
$GitPromptSettings.WorkingBackgroundColor = $GitPromptSettings.AfterBackgroundColor | |
# Foreground colors | |
$GitPromptSettings.BranchForegroundColor = "Blue" | |
$GitPromptSettings.BranchIdenticalStatusToForegroundColor = "White" | |
$GitPromptSettings.DelimForegroundColor = "Blue" | |
$GitPromptSettings.IndexForegroundColor = "Green" | |
$GitPromptSettings.WorkingForegroundColor = "Yellow" | |
# Prompt shape | |
$GitPromptSettings.AfterText = " " | |
$GitPromptSettings.BeforeText = " " | |
$GitPromptSettings.BranchIdenticalStatusToSymbol = "" | |
$GitPromptSettings.DelimText = " ॥" | |
$GitPromptSettings.LocalStagedStatusSymbol = "" | |
$GitPromptSettings.LocalWorkingStatusSymbol = "" | |
$GitPromptSettings.ShowStatusWhenZero = $false |
$windowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent() | |
$windowsPrincipal = new-object 'System.Security.Principal.WindowsPrincipal' $windowsIdentity | |
if ($psISE) { $color = "Black"; } | |
elseif ($windowsPrincipal.IsInRole("Administrators") -eq 1) { $color = "Red"; } | |
else { $color = "Green"; } | |
$Host.UI.RawUI.ForegroundColor = $GitPromptSettings.DefaultForegroundColor | |
write-host " " -NoNewLine | |
Write-VcsStatus | |
write-host " " -NoNewLine | |
if ((get-location -stack).Count -gt 0) { | |
write-host (("+" * ((get-location -stack).Count))) -NoNewLine -ForegroundColor Cyan | |
write-host " " -NoNewLine | |
} | |
write-host "$" -NoNewLine -ForegroundColor $color | |
return " " |
This comment has been minimized.
This comment has been minimized.
Would you mind posting a brief recording/gif demoing your settings? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Colors I use in ConEmu: