We need to save our current theme and add usage of it to the session start. This setting is only for the current session, and you do no really want to use the module by typing in the command every time you start new session. Your PowerShell terminal looks cool already, but there are few more things you need to do. I really like nu4a theme which I used as a starting point for my custom theme, so I set that one initially To do this, let's first picha theme to start using it When the command execution is done, you will have your module installed but you are still not using it and you won't notice any change in the terminal. Install-Module oh-my-posh -Scope CurrentUser So start your PowerShell session from Windows Terminal and install oh-my-posh theme with the following command Installing oh-my-posh and setting the theme We have Nerd Fonts in place and we can proceed to installing and configuring oh-my-posh. Here you will be able to select CascaydiaCove Nerd Font so that all icons used in oh-my-posh themes are displayed properly. Select PowerShell and in the right panel go to Appearance section. On the left side you'll see list of all terminal environment you have available on your machine. Next step is to set it as font for the PowerShell terminal from Windows Terminal, so launch Windows Terminal and go to settings. It will take just few seconds and you should have it available in pretty much all aplications on your system. Once you download the archive containing the fonts from Cascaydia family, select them all and install via right click. This Font is required so that icons used by oh-my-posh and Terminal Icons are displayed properly. I prefer Cascaydia Cove Nerd Font which you can download from the Nerd Fonts download list or directly from the link here. Now that you have your Windows Terminal installed, before we even proceed to settin up oh-my-posh, you will need to install one of the Nerd Fonts. For me this is the most convenient way of using it, so I'll continue explaining how to setup oh-my-posh to work properly from Windows Terminal, although I will also mention how to have this in place if you are not using windows terminal and you start your PowerSehll terminal using cmd or directly from shortcut on your Windows 10 environment. I use my PowerShell session from Windows Terminal which is now available from Windows Store, so you can easily install it from there. You can go to official page of oh-my-posh and find the guide how to set it up, but I found that even some of my friends who are IT savvy had troubles and some problem setting up and customizing their PowerShell terminal profiles. OK you are completely new to this and you want to have your terminal look like the one above. Setting up oh-my-posh for PowerShell from the scratch ![]() However you still may want to stick around and read the article to the end as I will cover some additional customization if you want your PowerShell prompt to look like the image above. Update-Module -Name oh-my-posh -Scope CurrentUser Simple run of the following command will upgrade your current version If you are not new to oh-my-posh and you happen to already use oh-my-posh v2 than you can just simply follow the guide for upgrading from v2 from oh-my-posh official website. If you haven't switch to new version I suggest you do so as it a lot more flexible and cross-platform as well Upgrading to oh-my-posh v3 for PowerShell ![]() I barely use old PowerShell 5 which is replaced by Microsoft in 2016 with PowerShell Core which is practically PowerShell 6. This customization is done with PowerShell 7. I went one step further with PowerShell customization and I created my own theme based on pr-existing one from oh-my-posh themes list. For this reason I decided to write this article that takes you to setting up and customizing your terminal profile step by step starting from the scratch. I found that oh-my-posh rleased a new version in the meanwhile and there are some other PowerSehll Modules like Terminal Icons you can use to customize your terminal environment and make it more easier and more eye appealing to work work with it.Įven thou oh-my-posh and Terminal Icons have quite good documentation on how to set them up for your PowerShell terninal profile, some people have troubles putting all configuration in place. However recently I found myself working a lot in PowerShell prompt mainly with Git and really missed the customization I did for WSL, so I decided to customize my PowerShell console as well. Last year I wrote an article on how to Customizing WSL2 on Windows with screenfetch and oh-my-zsh as I was spending a lot of time in WSL2 doing some heavy development for Linux platform using.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |