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]@{
|
|
|
|
ColorSeparator = "$([char]::ConvertFromUtf32(0x2588)
|
|
|
|
)$([PoshCode.Pansies.Entities]::ExtendedCharacters.ColorSeparator.Trim()[-1]) "
|
|
|
|
ReverseColorSeparator = " $(
|
|
|
|
[PoshCode.Pansies.Entities]::ExtendedCharacters.ReverseColorSeparator.Trim()[0]
|
|
|
|
)$([char]::ConvertFromUtf32(0x2588))"
|
|
|
|
Separator = " $([PoshCode.Pansies.Entities]::ExtendedCharacters.Separator.Trim()[-1]) "
|
|
|
|
ReverseSeparator = " $(
|
|
|
|
[PoshCode.Pansies.Entities]::ExtendedCharacters.ReverseSeparator.Trim()[0]) "
|
|
|
|
}
|
|
|
|
Colors = @( [rgbcolor]"Grey18", [rgbcolor]"Grey65" ) #, [rgbcolor]"white", [rgbcolor]"red", [rgbcolor]"blue" )
|
|
|
|
Prompt = @(
|
|
|
|
{ "`n" } # A spaced line
|
|
|
|
{ New-PromptText -EBg VioletRed4 $MyInvocation.HistoryId }
|
|
|
|
{ Get-Elapsed -Trim }
|
|
|
|
{ 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" }
|
|
|
|
{ "$env:USERNAME @ $env:COMPUTERNAME" }
|
|
|
|
{ Get-Date -Format 'HH:mm:ss' }
|
|
|
|
{ Get-Date -Format 'MM/dd ddd' }
|
|
|
|
{ "$PSOSName " }
|
|
|
|
|
|
|
|
{ "`n" }
|
|
|
|
{ New-PromptText { "PS" } -Ebg Red }
|
|
|
|
)
|
|
|
|
}
|
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"
|