timochan

timochan

Fluent Terminal Beautification

Before_Start#

You should have Scoop. If you don't, please refer to this article 1.

There are some good terminals, for example:

  • Windows Terminal (Microsoft Store)
  • Fluent Terminal (Microsoft Store)

For personal reasons, I prefer Fluent Terminal because it looks better and matches the overall UI style of Windows 11 more?

Start#

powershell 7#

It is strongly recommended to install and use powershell 7. You can install it using Scoop, for example:

scoop install pwsh

Of course, you can also download and install it from the Github repository.

And set it as the default shell.

image

posh-git#

Install posh-git using Scoop (skip if not needed).

scoop install posh-git

Check if the installation is complete.

Import-Module posh-git

If there are no errors, it means the installation is successful.

oh-my-posh#

Install oh-my-posh using Scoop.

scoop install oh-my-posh

Check if the installation is complete.

oh-my-posh init pwsh | Invoke-Expression

If there are no errors, it means the installation is successful.

Fonts#

oh-my-posh contains many icons that are not supported by the default Windows fonts. We need to install fonts.

We can also use Scoop to complete this.

First, add the font repository.

scoop bucket add nerd-fonts

I like the Fira Code font, but I don't know the exact name. What should I do?

You can search for it.

scoop search firacode

You should get the following results.

~ ❯ scoop search firacode
'nerd-fonts' bucket:
    FiraCode-NF-Mono (2.1.0)
    FiraCode-NF (2.1.0)
    FiraCode-Script (0.0.28)
    FiraCode (6.2)

Obviously, we should use the font with NF. Here, I recommend installing it globally, which requires elevated privileges. What should we do?

Install sudo.

scoop install sudo

Install the font.

sudo scoop install FiraCode-NF

Now, let's switch to the font. If you don't see it, it is recommended to restart the system (log out).

theme#

oh-my-posh comes with many built-in themes. If it doesn't have the one you want, you'll need to manually handle it. Go to the oh-my-posh repository and find the one you want.

Check the available themes.

Get-PoshThemes

Choose your favorite theme and remember its name. I like peru.

Setting#

We need to write it to the configuration file to achieve persistence.

Notepad $PROFILE

Write the following content.

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\peru.omp.json" | Invoke-Expression
Import-Module posh-git

Save it, and now Fluent Terminal will look beautiful every time you start it!

End#

image

Footnotes#

  1. https://www.timochan.cn/posts/jc/installation_and_use_of_scoop

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.