Setup updates
This commit is contained in:
parent
a2888a883b
commit
179f617bac
2 changed files with 30 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
Set-PowerLinePrompt -PowerLineFont
|
||||
|
||||
$local:MyPowerLineSetup = [ordered]@{
|
||||
Title = { "Sz PS" }
|
||||
Title = { "PSz" }
|
||||
SetCurrentDirectory = $true
|
||||
RestoreVirtualTerminal = $true
|
||||
PowerLineCharacters = [ordered]@{
|
||||
|
@ -40,13 +40,22 @@ $local:MyPowerLineSetup = [ordered]@{
|
|||
# Right-align block
|
||||
{ "`t" }
|
||||
{ "$($PromptCache.Username)@$($PromptCache.Hostname)" }
|
||||
{ Get-Elapsed -Trim }
|
||||
{
|
||||
(Get-Elapsed -Format "{0:d\:h\:m\:s\.ffff}") `
|
||||
-replace '\.(\d{1,3})\d*$','s $1ms' `
|
||||
-replace '\:([^:]*)$','m $1' `
|
||||
-replace ':([^:]*)','d $1' `
|
||||
-replace '\b0+[dms]\b ','' `
|
||||
-replace '( ?)\b0+(\d+ms)$','$1$2' `
|
||||
-replace ' ?0ms','' `
|
||||
-replace '^ *$','0'
|
||||
}
|
||||
{ Get-Date -Format 'HH:mm:ss' }
|
||||
{ Get-Date -Format 'ddd(dd)' }
|
||||
{ "$PSOSName " }
|
||||
{ "$($PromptCache.OSName) " }
|
||||
|
||||
{ "`n" }
|
||||
{ New-PromptText { "PS" } -Bg $Prompt.Colors[1] -Ebg Red }
|
||||
{ New-PromptText { "PS" } -Bg $Prompt.Colors[1] -Ebg Red; }
|
||||
)
|
||||
}
|
||||
Set-PowerLinePrompt @MyPowerLineSetup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue