You can install Oh My Posh to change Windows Powershell into your own unique UI.
First, visit the Oh My Posh homepage. You can check the installation method and available themes on the website.
Install Oh My Posh.
1. Execute the following command in Windows Powershell
\> winget install JanDeDobbeleer.OhMyPosh -s winget
2. Setting Windows PATH environment variable.
When you install Oh My Posh, it will be installed in C:\Users\{user}\AppData\Local\Programs\oh-my-posh. You must register the location in Windows PATH.
If it is properly registered in PATH, the oh-my-posh.exe command will be executed.
3. Open the Powershell basic profile.
\> notepad.ext $profile
If the profile is registered properly, it opens as shown below.
If the profile cannot be found, the error screen below opens.
In this case, register the profile with the command below.
\> New-Item -type file -path $profile -force
If registered properly, the following results are returned.
4. Open Profile again and set the theme.
\> notepad.exe $profile
When the profile is opened, a theme initialization command is added.
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression
5. Open Windows Powershell again.
You can check that the theme has been applied properly.
If the special symbols on the screen above are broken, the problem occurs because the corresponding font is not installed. In this case, we recommend installing the Nerd font. Install the font as shown below and change the font in Powershell settings.
\> oh-my-posh font install meslo
After the installation is complete, change Powershell Settings > Profiles > Defaults > Appreance > Font.
6. Check available themes.
\> Get-PoshThemes
If you run this command, you can preview the available themes. Select the theme you want to use, change the json file in Profile, and open Powershell again.
Create your own Powershell using Oh My Posh. Additionally, if you open the Json file, you can modify various elements. You can make more detailed changes, so please use it.
Comments
Post a Comment