basic system setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$FontRelease = "2111.01" | |
$FontArchive = "CascadiaCode-${FontRelease}.zip" | |
wget.exe "https://github.com/microsoft/cascadia-code/releases/download/v$FontRelease/$FontArchive" | |
# -aoa = always overwrite | |
7z x -oCascadiaCode -aoa "${FontArchive}" | |
# https://blog.simontimms.com/2021/06/11/installing-fonts/ | |
$fonts = (New-Object -ComObject Shell.Application).Namespace(0x14) | |
foreach ($file in Get-ChildItem CascadiaCode\ttf\*.ttf) | |
{ | |
$fn = $file.Name | |
if (-not (Test-Path "C:\Windows\fonts\$fn")) { | |
Write-Host "$fn" | |
Get-Item $file | %{ $fonts.CopyHere($_.fullname) } | |
} | |
} | |
sudo Copy-Item CascadiaCode\ttf\*.ttf c:\Windows\fonts\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install scoop | |
Set-ExecutionPolicy RemoteSigned -scope CurrentUser | |
# for bare metal | |
iwr -useb get.scoop.sh | iex | |
# or, for VM with a shared w:\ drive already | |
$env:SCOOP = 'w:\scoop' | |
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User') | |
iwr get.scoop.sh -outfile 'install.ps1' | |
.\install.ps1 -ScoopDir $env:SCOOP | |
# install some basics | |
winget install git.git | |
scoop bucket add rp-scoops https://github.com/rpavlik/rp-scoops | |
scoop bucket add extras | |
# common stuff | |
scoop install ninja debugviewpp cmake gh ripgrep sysinternals notepad3 nano wget 7zip sudo posh-git | |
# The alphanumeric ID is windows terminal | |
winget install 9N0DX20HK701 | |
winget install Mozilla.Firefox | |
winget install vscode | |
sudo Add-MpPreference -ExclusionProcess oh-my-posh.exe | |
# see also https://gist.github.com/rpavlik/c5f297be79bab1077ecd26339dcb674f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run this in pwsh, not the same terminal as above | |
if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force } | |
oh-my-posh init pwsh | Invoke-Expression | |
Import-Module ((scoop prefix posh-git) + "\posh-git.psm1") | |
Add-PoshGitToProfile | |
wget.exe "https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/agnoster.omp.json" ~/agnoster.omp.json | |
oh-my-posh init pwsh --config ~/agnoster.omp.json | Invoke-Expression | |
if (!Get-Content $PROFILE | Select-String -Pattern "oh-my-posh") { | |
Add-Content -Path $PROFILE -Value "oh-my-posh init pwsh --config ~/agnoster.omp.json | Invoke-Expression" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment