Last active
December 7, 2017 12:30
-
-
Save bradwilson/5ec6ce97ff9f17ecec08 to your computer and use it in GitHub Desktop.
Custom Posh-Git prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 " " |
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
Colors I use in ConEmu: