Table of Content
Installation
First, you need to install the Powershell from Microsoft Store. After that, go to the Powershell terminal to run the below command and then restart the terminal.
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))
Activation
Now you need to initialize the Profile. So, the first thing you need to do is run the following command and check its path:
echo $profile
After that, you will need to create the profile manually using the above getting path, and an editor will need to open the file where the following line must be added:
oh-my-posh --init --shell pwsh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/jandedobbeleer.omp.json | Invoke-Expression
Now press Ctrl + S. And the last one is, if you want to set beautiful terminal icons, then add the following line in the profile also (Optional):
Import-Module -Name Terminal-Icons
Then, install the terminal icons module using the below command and restart the terminal.
Install-Module -Name Terminal-Icons -RequiredVersion 0.9.0
Install Nerd Font
You need to use Nerd Font to display all the nice custom icons. You can download them directly from here. Just save them on your computer, unzip and install them and you need to set this font from terminal settings.
Change the Theme
If you want to change your current theme, then open your Profile Script by running the below command:
notepad $profile
Now, scroll to where you added your Theme Config and replace the old theme name with the new theme name.
oh-my-posh --init --shell pwsh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/night-owl.omp.json | Invoke-Expression
Now press Ctrl + S. Then restart the terminal.
Top comments (0)