Beautify your windows shell terminal, the simplest tutorial!
Step 1Installationoh-my-posh
Tip: It is best to be in an external network environment Installation, direct use of the network may cause packet loss problems
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))
Step 2 Introduce oh-my-posh into the terminal
Tip: You can use an editor or text~
notepad $PROFILE
Step 3 Write the configuration to $PROFILE
Import-Module PSReadLine
oh-my-posh init pwsh --config $env:POSH_THEMES_PATH\powerline.omp.json | Invoke-Expression
After completing this step and restarting, you will find that the fonts are garbled because oh-my-posh depends onNerd Fonts fonts. Let’s go to the official website. Just choose a font you like, download and install
Step 4 Install font
Open the decompressed font and click Install
After the installation is complete, restart the terminal again and you can see your personalized Shell~
Of course, there are many highly customizable settings waiting for you to unlock. I will also introduce a few examples below.
- Theme settings
- shell related
Open the shell configuration file in this path %LOCALAPPDATA%\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
Write json configuration
"defaults":
{
// SETTINGS TO APPLY TO ALL PROFILES
},
"list":
[
// PROFILE OBJECTS
]
For more advanced gameplay waiting for you to unlock, please refer to Windows Shell Config