PowerShell.format.ps1xml
<Configuration>
<ViewDefinitions> <View> <Name>PowerShell-Preview</Name> <ViewSelectedBy> <TypeName>Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy</TypeName> <TypeName>Selected.Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy</TypeName> </ViewSelectedBy> <CustomControl> <CustomEntries> <CustomEntry> <CustomItem> <ExpressionBinding> <ScriptBlock> $W = -1 + $Host.UI.RawUI.BufferSize.Width if ($W -le 0) { $W = 80 } (@( New-Text -ForegroundColor $_.ProgressForegroundColor -BackgroundColor $_.ProgressBackgroundColor (@( (' ' * $W) " PROGRESS: ForegroundColor: $($_.ProgressForegroundColor), BackgroundColor: $($_.ProgressBackgroundColor)".PadRight($W, " ") (' ' * $W) ) -join "`n") New-Text "DEBUG: ForegroundColor: $($_.DebugForegroundColor), BackgroundColor: $($_.DebugBackgroundColor)" -ForegroundColor $_.DebugForegroundColor -BackgroundColor $_.DebugBackgroundColor New-Text "VERBOSE: ForegroundColor: $($_.VerboseForegroundColor), BackgroundColor: $($_.VerboseBackgroundColor)" -ForegroundColor $_.VerboseForegroundColor -BackgroundColor $_.VerboseBackgroundColor New-Text "WARNING: ForegroundColor: $($_.WarningForegroundColor), BackgroundColor: $($_.WarningBackgroundColor)" -ForegroundColor $_.WarningForegroundColor -BackgroundColor $_.WarningBackgroundColor New-Text "ERROR: ForegroundColor: $($_.ErrorForegroundColor), BackgroundColor: $($_.ErrorBackgroundColor)" -ForegroundColor $_.ErrorForegroundColor -BackgroundColor $_.ErrorBackgroundColor if (($Extras = $_.PSObject.Properties.Where{ $_.Name -NotIn "Theme", "Foreground", "Background", "DebugForegroundColor", "DebugBackgroundColor", "ProgressForegroundColor", "ProgressBackgroundColor", "VerboseForegroundColor", "VerboseBackgroundColor", "WarningForegroundColor", "WarningBackgroundColor", "ErrorForegroundColor", "ErrorBackgroundColor" })) { "${bg:Clear}${fg:Clear}ACCENT: " + (@( foreach($Extra in $Extras) { $($Extra.Value -as [PoshCode.Pansies.RgbColor] | % ToVtEscapeSequence) + $Extra.Name + ": " + $Extra.Value } ) -join "${fg:Clear}, ") } ) -join "`n") + "${bg:Clear}${fg:Clear}" </ScriptBlock> </ExpressionBinding> </CustomItem> </CustomEntry> </CustomEntries> </CustomControl> </View> </ViewDefinitions> </Configuration> |