Created
December 20, 2011 15:42
-
-
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
This file contains hidden or 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
| $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