Image
This article will summarize the development of Add-Ins for Outlook.  Use the basic template using Yeoman and Yeoman Generator. Development environment OS: Windows 11 .Net version: 8.0 Development tool: Visual Studio Code Node.js version: 18.20.4 Yeoman version: 5.0.0 Development language: React, Typescript

Setting up Windows Powershell with Oh-My-Posh

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.

Oh My Posh Homepage








Install Oh My Posh.

1. Execute the following command in Windows Powershell

   \> winget install JanDeDobbeleer.OhMyPosh -s winget

winget command








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.
oh-my-posh.exe execution screen








3. Open the Powershell basic profile.

   \> notepad.ext $profile

If the profile is registered properly, it opens as shown below.

Powershell profile open screen









If the profile cannot be found, the error screen below opens.

Profile error screen








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.
profile.ps1 is created in the C:\Users\{User}\Documents\WindowsPowerShell folder.




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

Profile screen









5. Open Windows Powershell again.

You can check that the theme has been applied properly.

Powershell screen with theme applied








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.
Font setting screen













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.
Theme list screen












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

Popular posts from this blog

[NETSDK1136] the target platform must be set to windows