Skip to content

Instantly share code, notes, and snippets.

@brunomlopes
Created December 20, 2011 15:42
Show Gist options
  • Save brunomlopes/1501997 to your computer and use it in GitHub Desktop.
Save brunomlopes/1501997 to your computer and use it in GitHub Desktop.
Open "Package Manager Console" and execute this to show the full solution name and git branch on the main window title
$output = git status
$branchbits = $output[0].Split(' ')
$branch = $branchbits[$branchbits.length - 1]
$signature = @"
[DllImport("user32.dll")]
public static extern bool SetWindowText(IntPtr hWnd, string lpString);
"@
$setWindowText = Add-Type -memberDefinition $signature -name "Win32SetWindowText" -namespace Win32Functions -passThru
$setWindowText::SetWindowText($dte.MainWindow.HWnd, $dte.Solution.FullName + " - " + $branch + " - " + "Visual Studio 2010")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment