diff --git a/win/Modules/Font/Font.psm1 b/win/Modules/Font/Font.psm1 new file mode 100644 index 0000000..7a706d2 --- /dev/null +++ b/win/Modules/Font/Font.psm1 @@ -0,0 +1,18 @@ + +function Get-Font{ + [CmdletBinding()] + param( + [string] $keyword + ) + + [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") + $families = (New-Object System.Drawing.Text.InstalledFontCollection).Families + foreach ($family in $families) { + if (-not $keyword || $family.Name.Contains($keyword)) { + echo $family.Name + } + } +} + +Export-ModuleMember -Function Get-Font + diff --git a/win/profile.ps1 b/win/profile.ps1 index 5c70518..3ff7b0e 100644 --- a/win/profile.ps1 +++ b/win/profile.ps1 @@ -14,6 +14,7 @@ $Env:PSModulePath += ";$Dir\Modules" $Env:KUBE_EDITOR = 'nvim' $Env:EDITOR = 'nvim' Set-Alias -Name k kubectl +Set-Alias -Name bm Open-Bookmark $isPs7 = $host.Version.Major -ge 7 if ( $isPs7 ) { Set-Prompt