Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting Ubuntu Terminal to solarized light/dark
## Original Script Credit: Drew Furgiuele @pittfurg
## https://port1433.com/2019/06/17/using-the-windows-subsystem-for-linux/
## Color mapping found here: https://github.com/neilpa/cmd-colors-solarized
## Get the current installed console values
$consoleName = (get-childitem -path Registry::HKEY_CURRENT_USER\Console | Where-Object {$_.Name -like "*ubuntu*"}).pschildname
##Next, go out and get the current console item from the current user registry
Push-Location HKCU:\Console
$console = Get-ItemProperty -PATH ("Registry::HKEY_CURRENT_USER\Console\" + $consolename)
$console | Set-ItemProperty -Name "ColorTable00"-Value 0x00362b00 -type Dword
$console | Set-ItemProperty -Name "ColorTable01"-Value 0x00969483 -type Dword
$console | Set-ItemProperty -Name "ColorTable02"-Value 0x00756e58 -type Dword
$console | Set-ItemProperty -Name "ColorTable03"-Value 0x00a1a193 -type Dword
$console | Set-ItemProperty -Name "ColorTable04"-Value 0x00164bcb -type Dword
$console | Set-ItemProperty -Name "ColorTable05"-Value 0x00c4716c -type Dword
$console | Set-ItemProperty -Name "ColorTable06"-Value 0x00837b65 -type Dword
$console | Set-ItemProperty -Name "ColorTable07"-Value 0x00d5e8ee -type Dword
$console | Set-ItemProperty -Name "ColorTable08"-Value 0x00423607 -type Dword
$console | Set-ItemProperty -Name "ColorTable09"-Value 0x00d28b26 -type Dword
$console | Set-ItemProperty -Name "ColorTable10"-Value 0x00009985 -type Dword
$console | Set-ItemProperty -Name "ColorTable11"-Value 0x0098a12a -type Dword
$console | Set-ItemProperty -Name "ColorTable12"-Value 0x002f32dc -type Dword
$console | Set-ItemProperty -Name "ColorTable13"-Value 0x008236d3 -type Dword
$console | Set-ItemProperty -Name "ColorTable14"-Value 0x000089b5 -type Dword
$console | Set-ItemProperty -Name "ColorTable15"-Value 0x00e3f6fd -type Dword
$console | Set-ItemProperty -Name "ScreenColors"-Value 0x00000001 -type Dword
$console | Set-ItemProperty -Name "PopupColors" -Value 0x000000f6 -type Dword
Pop-Location
## Original Script Credit: Drew Furgiuele @pittfurg
## https://port1433.com/2019/06/17/using-the-windows-subsystem-for-linux/
## Color mapping found here: https://github.com/neilpa/cmd-colors-solarized
## Get the current installed console values
$consoleName = (get-childitem -path Registry::HKEY_CURRENT_USER\Console | Where-Object {$_.Name -like "*ubuntu*"}).pschildname
##Next, go out and get the current console item from the current user registry
Push-Location HKCU:\Console
$console = Get-ItemProperty -PATH ("Registry::HKEY_CURRENT_USER\Console\" + $consolename)
$console | Set-ItemProperty -Name "ColorTable00"-Value 0x00362b00 -type Dword
$console | Set-ItemProperty -Name "ColorTable01"-Value 0x00969483 -type Dword
$console | Set-ItemProperty -Name "ColorTable02"-Value 0x00756e58 -type Dword
$console | Set-ItemProperty -Name "ColorTable03"-Value 0x00a1a193 -type Dword
$console | Set-ItemProperty -Name "ColorTable04"-Value 0x00164bcb -type Dword
$console | Set-ItemProperty -Name "ColorTable05"-Value 0x00c4716c -type Dword
$console | Set-ItemProperty -Name "ColorTable06"-Value 0x00837b65 -type Dword
$console | Set-ItemProperty -Name "ColorTable07"-Value 0x00d5e8ee -type Dword
$console | Set-ItemProperty -Name "ColorTable08"-Value 0x00423607 -type Dword
$console | Set-ItemProperty -Name "ColorTable09"-Value 0x00d28b26 -type Dword
$console | Set-ItemProperty -Name "ColorTable10"-Value 0x00009985 -type Dword
$console | Set-ItemProperty -Name "ColorTable11"-Value 0x0098a12a -type Dword
$console | Set-ItemProperty -Name "ColorTable12"-Value 0x002f32dc -type Dword
$console | Set-ItemProperty -Name "ColorTable13"-Value 0x008236d3 -type Dword
$console | Set-ItemProperty -Name "ColorTable14"-Value 0x000089b5 -type Dword
$console | Set-ItemProperty -Name "ColorTable15"-Value 0x00e3f6fd -type Dword
$console | Set-ItemProperty -Name "ScreenColors"-Value 0x000000f6 -type Dword
$console | Set-ItemProperty -Name "PopupColors" -Value 0x00000001 -type Dword
Pop-Location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.