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:
Gal 2021-10-29 13:31:24 -04:00
parent c7ec1e8c5d
commit b0ec8e1780
9 changed files with 68 additions and 29 deletions

View file

@ -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