Introducting PowerLine module
Added ExistingModules to packages, for module dependent package manifest Moved PowerLine styling code to the PowerLine pacakge. Added Package install code generation to Get-MyModules. Fixed typo in EnsureJoinString Fixed: Scoop operations would fail calling internal url function.
This commit is contained in:
parent
c7ec1e8c5d
commit
b0ec8e1780
9 changed files with 68 additions and 29 deletions
|
@ -32,30 +32,7 @@ Get-Command -ListImported Get-GitDirectory -ErrorAction Ignore |
|
|||
}
|
||||
}
|
||||
|
||||
if( (Get-Command -ListImported Set-PowerLinePrompt -ErrorAction Ignore) ) {
|
||||
$global:PromptCache = [ordered]@{
|
||||
OSName = [SystemName]::_GetValidValues("",$true,$true) | Select-Object -First 1
|
||||
Username = @($env:USER, $env:USERNAME -ne "")[0]
|
||||
Hostname = $(hostname).Trim()
|
||||
ColorFiller = $([char]0x2588)
|
||||
Separator = " $(
|
||||
[PoshCode.Pansies.Entities]::NerdFonts['nf-pl-left_hard_divider']
|
||||
)"
|
||||
ReverseSeparator = "$(
|
||||
[PoshCode.Pansies.Entities]::NerdFonts['nf-pl-right_hard_divider']
|
||||
) "
|
||||
# Separator = "$(
|
||||
# [char]::ConvertFromUtf32(0x2588)
|
||||
# )$( [PoshCode.Pansies.Entities]::ExtendedCharacters.ColorSeparator.Trim()[-1]
|
||||
# ) "
|
||||
# ReverseSeparator = " $(
|
||||
# [PoshCode.Pansies.Entities]::ExtendedCharacters.ColorSeparator.Trim()[0]
|
||||
# )$( [char]::ConvertFromUtf32(0x2588))"
|
||||
|
||||
}
|
||||
|
||||
Set-PowerLinePrompt
|
||||
} elseif( (Get-Command -ListImported Set-PoshPrompt -ErrorAction Ignore) -and $IsOutputANSICompatible ) {
|
||||
if( (Get-Command -ListImported Set-PoshPrompt -ErrorAction Ignore) -and $IsOutputANSICompatible ) {
|
||||
$local:poshPrompt = Join-Path $HOME ".oh-my-posh.omp.json"
|
||||
if( -not (Test-Path $poshPrompt) ) { $poshPrompt = "slim" }
|
||||
Set-PoshPrompt -Theme $poshPrompt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue