Font installs

This commit is contained in:
Zackarias Montell
2026-01-22 11:06:10 +01:00
parent b52fc4c1f9
commit 59ec816051

View File

@@ -24,7 +24,11 @@ param (
[Alias('no-npm')]
[switch]$NoNpm,
[Alias('only-npm')]
[switch]$OnlyNpm
[switch]$OnlyNpm,
[Alias('no-fonts')]
[switch]$NoFonts,
[Alias('only-fonts')]
[switch]$OnlyFonts
)
if ($Help)
@@ -69,6 +73,7 @@ $Flags = [ordered]@{
PowershellEnabled = -not $NoPowershell
PipEnabled = -not $NoPip
NpmEnabled = -not $NoNpm
FontsEnabled = -not $NoFonts
}
function Reset-Flags
@@ -109,6 +114,11 @@ if ($OnlyNpm)
Reset-Flags
$Flags.NpmEnabled = $true
}
if ($OnlyFonts)
{
Reset-Flags
$Flags.FontsEnabled = $true
}
Write-Host "These providers are enabled:"
foreach ($key in $Flags.Keys)
@@ -205,5 +215,25 @@ if ($Flags.PowershellEnabled)
Install-Module posh-git -Scope CurrentUser -Force
}
if ($Flags.FontsEnabled)
{
Write-Divider
Write-Host "Installing Fonts"
Set-Location ~
Remove-Item ~\fonts | Out-Null
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/JetBrainsMono.zip
mkdir ~\fonts
Copy-Item ~\JetBrainsMono.zip ~\fonts\JetBrainsMono.zip
Set-Location ~\fonts | Out-Null
unzip JetBrainsMono.zip
Remove-Item JetBrainsMono.zip
$UserFonts = "$env:LOCALAPPDATA\Microsoft\Windows\Fonts"
New-Item -ItemType Directory -Path $UserFonts -Force | Out-Null
Get-ChildItem -Filter *.ttf | ForEach-Object {
Invoke-Item $_.FullName
}
Set-Location ~
}
Write-Divider
Write-Host "Done!"