[feature] Get-Font
This commit is contained in:
parent
67cee9064e
commit
5620deecef
18
win/Modules/Font/Font.psm1
Normal file
18
win/Modules/Font/Font.psm1
Normal file
|
@ -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
|
||||||
|
|
|
@ -14,6 +14,7 @@ $Env:PSModulePath += ";$Dir\Modules"
|
||||||
$Env:KUBE_EDITOR = 'nvim'
|
$Env:KUBE_EDITOR = 'nvim'
|
||||||
$Env:EDITOR = 'nvim'
|
$Env:EDITOR = 'nvim'
|
||||||
Set-Alias -Name k kubectl
|
Set-Alias -Name k kubectl
|
||||||
|
Set-Alias -Name bm Open-Bookmark
|
||||||
$isPs7 = $host.Version.Major -ge 7
|
$isPs7 = $host.Version.Major -ge 7
|
||||||
if ( $isPs7 ) {
|
if ( $isPs7 ) {
|
||||||
Set-Prompt
|
Set-Prompt
|
||||||
|
|
Loading…
Reference in New Issue
Block a user