2021-10-12 01:16:43 +00:00
|
|
|
Set-PowerLinePrompt -PowerLineFont
|
|
|
|
|
2021-10-12 00:56:10 +00:00
|
|
|
$local:MyPowerLineSetup = [ordered]@{
|
|
|
|
Title = { "Sz PS" }
|
|
|
|
SetCurrentDirectory = $true
|
|
|
|
RestoreVirtualTerminal = $true
|
|
|
|
PowerLineCharacters = [ordered]@{
|
2021-10-12 05:31:28 +00:00
|
|
|
ColorSeparator = "$(
|
|
|
|
$PromptCache.ColorFiller
|
|
|
|
)$( $PromptCache.Separator.Trim()
|
|
|
|
)$( " "
|
|
|
|
)"
|
|
|
|
ReverseColorSeparator = "$(
|
|
|
|
" "
|
|
|
|
)$( $PromptCache.ReverseSeparator.Trim()
|
|
|
|
)$( $PromptCache.ColorFiller
|
|
|
|
)"
|
|
|
|
Separator = $(
|
|
|
|
[PoshCode.Pansies.Entities]::NerdFonts['nf-fa-angle_right']
|
|
|
|
)
|
|
|
|
ReverseSeparator = $(
|
|
|
|
[PoshCode.Pansies.Entities]::NerdFonts['nf-fa-angle_left']
|
|
|
|
)
|
2021-10-12 00:56:10 +00:00
|
|
|
}
|
2021-10-12 05:31:28 +00:00
|
|
|
Colors = [PoshCode.Pansies.RgbColor]::X11Palette |
|
|
|
|
Where-Object X11ColorName -match "^Gray\d" |
|
|
|
|
Sort-Object X11ColorName -Unique |
|
|
|
|
Where-Object {
|
|
|
|
0 -eq $([int]($_.X11ColorName -replace 'Gray','') % 11)
|
|
|
|
}
|
|
|
|
#@( [rgbcolor]"Grey18", [rgbcolor]"Grey65" )
|
|
|
|
#([rgbcolor]::ConsolePalette | Where ConsoleColor -eq ((get-host).ui.rawui.BackgroundColor)),
|
|
|
|
#@( [rgbcolor]"Grey18", [rgbcolor]"Grey65" ) #, [rgbcolor]"white", [rgbcolor]"red", [rgbcolor]"blue" )
|
2021-10-12 00:56:10 +00:00
|
|
|
Prompt = @(
|
2021-10-12 05:31:28 +00:00
|
|
|
{ Write-Host "" } # A spaced line without a ColorSeparator
|
2021-10-12 00:56:10 +00:00
|
|
|
{ New-PromptText -EBg VioletRed4 $MyInvocation.HistoryId }
|
|
|
|
{ Get-SegmentedPath -LengthLimit 30 }
|
2021-10-12 01:37:18 +00:00
|
|
|
{ Write-VcsStatus }
|
2021-10-12 00:56:10 +00:00
|
|
|
|
|
|
|
# Right-align block
|
|
|
|
{ "`t" }
|
2021-10-12 02:29:08 +00:00
|
|
|
{ "$($PromptCache.Username)@$($PromptCache.Hostname)" }
|
|
|
|
{ Get-Elapsed -Trim }
|
2021-10-12 00:56:10 +00:00
|
|
|
{ Get-Date -Format 'HH:mm:ss' }
|
2021-10-12 02:29:08 +00:00
|
|
|
{ Get-Date -Format 'ddd(dd)' }
|
2021-10-12 00:56:10 +00:00
|
|
|
{ "$PSOSName " }
|
|
|
|
|
|
|
|
{ "`n" }
|
2021-10-12 05:31:28 +00:00
|
|
|
{ New-PromptText { "PS" } -Bg $Prompt.Colors[1] -Ebg Red }
|
2021-10-12 00:56:10 +00:00
|
|
|
)
|
|
|
|
}
|
2021-10-12 01:16:43 +00:00
|
|
|
Set-PowerLinePrompt @MyPowerLineSetup
|
|
|
|
|
2021-10-12 01:37:18 +00:00
|
|
|
Write-Host -ForegroundColor Cyan "PowerLine Theme is ready, if you want to persist it, don't forget to run Export-PowerLinePrompt`n"
|