Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Install All Nerd Fonts

### Install Terminal-Icons (get LiterationMono NF Nerd font, install, add required Console registry key, then install required Modules)
$url = 'https://github.com/haasosaurus/nerd-fonts/raw/regen-mono-font-fix/patched-fonts/LiberationMono/complete/Literation%20Mono%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf'
$name = "LiterationMono NF"
$file = "$($env:TEMP)$($name).ttf"
Start-BitsTransfer -Source $url -Destination $file   # Download the font

$Install = $true  # $false to uninstall (or 1 / 0)
$FontsFolder = (New-Object -ComObject Shell.Application).Namespace(0x14)   # Must use Namespace part or will not install properly
$filename = (Get-ChildItem $file).Name
$filepath = (Get-ChildItem $file).FullName
$target = "C:WindowsFonts$($filename)"

If (Test-Path $target -PathType Any) { Remove-Item $target -Recurse -Force } # UnInstall Font

If ((-not(Test-Path $target -PathType Container)) -and ($Install -eq $true)) { $FontsFolder.CopyHere($filepath, 16) }   # Following action performs the install, requires user to click on yes

$key = 'HKLM:SOFTWAREMicrosoftWindows NTCurrentVersionConsoleTrueTypeFont'   # Need to set this for console
Set-ItemProperty -Path $key -Name '000' -Value $name

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force   # Always need this, required for all Modules
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted   # Set Microsoft PowerShell Gallery to 'Trusted'
Install-Module Terminal-Icons -Scope CurrentUser
Import-Module Terminal-Icons
Install-Module WindowsConsoleFonts
Set-ConsoleFont $name
Set-TerminalIconsColorTheme -Name DevBlackOps   # After the above are setup, can add this to Profile to always load
Comment

PREVIOUS NEXT
Code Example
Shell :: linux nano how to go to a certain line 
Shell :: mv command in linux 
Shell :: sed replace into new file 
Shell :: c interpreter 
Shell :: curl parallel requests 
Shell :: docker 
Shell :: how add ssh 
Shell :: shell search history 
Shell :: linux bash search history 
Shell :: how to download fl studio on linux 
Shell :: how to install macos from usb 
Shell :: free image upload server 
Shell :: ubuntu adding a monitor 
Shell :: git percentage of authorship 
Shell :: how to see if you have lfs installed ubuntu 
Shell :: temeprature ubuntu command line 
Shell :: mpicc command not found debian 
Shell :: create vite app 
Shell :: docker-compose-to-always-re-create-containers-from-fresh-images 
Shell :: Pipe script to a remote server 
Shell :: install docpars 
Shell :: ghostscript pdf to text 
Shell :: No project found at or above and neither was a --path specified 
Shell :: Enum install 
Shell :: mac remove extra file attributes 
Shell :: linux less go to last line 
Shell :: cancel jobs related to one name 
Shell :: netplan reload 
Shell :: h ohup out with diffrent name 
Shell :: active directory user kopieren per powershell 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =