Skip to content

Instantly share code, notes, and snippets.

@EricZimmerman
Last active July 9, 2024 03:32
Show Gist options
  • Save EricZimmerman/0739e0181d0259e76ea67faa24cb411b to your computer and use it in GitHub Desktop.
Save EricZimmerman/0739e0181d0259e76ea67faa24cb411b to your computer and use it in GitHub Desktop.
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\powerlevel10k_rainbow.omp.json" | Invoke-Expression
Import-Module -Name Terminal-Icons
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -PredictionSource history
@EricZimmerman
Copy link
Author

EricZimmerman commented Feb 12, 2022

Step by step

NOTE: You can defer font installation until after oh-my-posh is installed, then use:

oh-my-posh font install Meslo

to install the fonts. Manual steps below however:

download these fonts:
https://github.com/romkatv/powerlevel10k-media/blob/master/MesloLGS%20NF%20Bold%20Italic.ttf
https://github.com/romkatv/powerlevel10k-media/blob/master/MesloLGS%20NF%20Bold.ttf
https://github.com/romkatv/powerlevel10k-media/blob/master/MesloLGS%20NF%20Regular.ttf
https://github.com/romkatv/powerlevel10k-media/blob/master/MesloLGS%20NF%20Italic.ttf

install all fonts for all users

install terminal (preview?)
install powershell 7
open terminal as admin
go to settings
make powershell 7 default
under default appearance, set font to meslo NF regular
save settings

in ps7 window, run the following commands:

Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))

oh-my-posh --init --shell pwsh --config $env:POSH_THEMES_PATH\powerlevel10k_rainbow.omp.json | Invoke-Expression
Get-PoshThemes


Install-Module terminal-icons

Install-Module -Name PowerShellGet -Force
Install-Module PSReadLine -AllowPrerelease -Force
notepad.exe $PROFILE

add this to profile and save:

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

Import-Module -Name Terminal-Icons

Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -PredictionSource history

@EricZimmerman
Copy link
Author

to edit profile, from powershell:

notepad $PROFILE

@jamesleytevidal
Copy link

image
This is what it looks like after the above work. This what you're looking for?

@bmackalicious
Copy link

FYI for VSCode Terminal:
Open Settings in Visual Studio Code.

On PC: press Ctrl+, or click File → Preferences → Settings.
On Mac: press ⌘ , or click Code → Preferences → Settings.
Enter terminal.integrated.fontFamily in the search box at the top of Settings tab and set the value below to MesloLGS NF.

from romkatv/powerlevel10k#671 (comment)

@EricZimmerman
Copy link
Author

you can also install fonts via

oh-my-posh font install

once oh-my-posh is installed

@AndrewRathbun
Copy link

Just installed this, thanks for sharing 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment