Skip to content

Instantly share code, notes, and snippets.

@severud
Last active June 23, 2022 00:46
Show Gist options
  • Select an option

  • Save severud/618f573b367edb14e8344575af7a17c9 to your computer and use it in GitHub Desktop.

Select an option

Save severud/618f573b367edb14e8344575af7a17c9 to your computer and use it in GitHub Desktop.

Console

Install Chocolatey

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Optional: Scoop

iwr -useb get.scoop.sh | iex

Retrieve Nerd Fonts

choco install cascadia-code-nerd-font

Update PSReadLine module & install module Terminal-Icons

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

Install-module PSReadLine -force

Install-Module -Name Terminal-Icons

Oh My Posh

winget install JanDeDobbeleer.OhMyPosh

View Oh-My-Posh Themes

  • Get-PoshThemes

Install Windows Terminal

winget install Microsoft.WindowsTerminal

Create Profile

New-Item -Type File -Force $PROFILE & 'C:\Program Files\Notepad++\notepad++.exe' $PROFILE

profile example

oh-my-posh init pwsh --config $env:POSH_THEMES_PATH\gmay.omp.json | Invoke-Expression

Import-Module -Name Terminal-Icons

if ($host.Name -eq 'ConsoleHost')
{
    Import-Module PSReadLine
}

Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment