Skip to content

Instantly share code, notes, and snippets.

@waf
Last active June 1, 2016 02:42
Show Gist options
  • Save waf/647efea37dfb92708dd033737c4f4b9a to your computer and use it in GitHub Desktop.
Save waf/647efea37dfb92708dd033737c4f4b9a to your computer and use it in GitHub Desktop.
Zenburn PowerShell git configuration
# in your home directory, add the following to the end of the .gitconfig file:
[color]
ui = true
[color "status"]
changed = cyan bold
untracked = yellow bold
added = green bold
branch = cyan bold
unmerged = red bold
[color "diff"]
frag = cyan
new = green bold
commit = yellow
old = red white
[color "branch"]
current = yellow reverse
local = yellow
remote = green bold
remote = red bold
# In C:\tools\poshgit\dahlbyk-posh-git-1941da2\ or see https://gist.github.com/SyntaxC4/7933408 alternative locations
# This file is big, with only some small changes. Find it on your system and
# change all DarkRed colors to Red, DarkRed color does not display well on dark backgrounds
# This file is in ~\Documents\WindowsPowershell\
# After opening powershell with this configuration, you might need to recreate your powershell windows shortcuts for
# the colors to take affect, because windows shortcuts cache color themes.
# you may also need to delete any registry directories (subkeys) under HKEY_CURRENT_USER\Console\
# Load posh-git example profile
. 'C:\tools\poshgit\dahlbyk-posh-git-1941da2\profile.example.ps1'
cd hkcu:/console
sp . ColorTable00 0x003f3f3f
sp . ColorTable01 0x00af6464
sp . ColorTable02 0x00008000
sp . ColorTable03 0x00c6c600
sp . ColorTable04 0x00232333
sp . ColorTable05 0x00aa50aa
sp . ColorTable06 0x0000dcdc
sp . ColorTable07 0x00ccdcdc
sp . ColorTable08 0x008080c0
sp . ColorTable09 0x00ffafaf
sp . ColorTable10 0x007f9f7f
sp . ColorTable11 0x00d3d08c
sp . ColorTable12 0x007071e3
sp . ColorTable13 0x00c880c8
sp . ColorTable14 0x00afdff0
sp . ColorTable15 0x00ffffff
sp . FaceName "Consolas"
sp . QuickEdit 0x00000001
sp . WindowPosition 0x01900384
Rename-Item Function:\Prompt PoshGitPrompt -Force
function Prompt() {if(Test-Path Function:\PrePoshGitPrompt){++$global:poshScope; New-Item function:\script:Write-host -value "param([object] `$object, `$backgroundColor, `$foregroundColor, [switch] `$nonewline) " -Force | Out-Null;$private:p = PrePoshGitPrompt; if(--$global:poshScope -eq 0) {Remove-Item function:\Write-Host -Force}}PoshGitPrompt}
@waf
Copy link
Author

waf commented Jun 1, 2016

Looks like this:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment