###### tags: `教學` Windows終端機美化 === Windows Terminal 安裝 --- 打開 Microsoft store 搜尋 `terminal`  接著就直接安裝就可以了 Oh My Posh 安裝 --- 打開 `PowerShell` 依序輸入兩行指令 ```shell=n Install-Module posh-git -Scope CurrentUser Install-Module oh-my-posh -Scope CurrentUser ``` >問題全選 `是` 接著設定自動套用,在 PowerShell 上輸入 $PROFILE ,依序輸入下列兩行指令 ```shell=n if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force} notepad $PROFILE ``` 接著再打開的記事本裡貼上 ```shell=n Import-Module posh-git Import-Module oh-my-posh Set-PoshPrompt Paradox ``` 儲存後就完成了 若出現下圖錯誤  則輸入 ```shell=n Set-ExecutionPolicy RemoteSigned ``` Nerd Font 字形安裝 --- Oh My Posh 這個套件是設計成要用 [`Nerd Font`][nerdfonts] 的 而且 [`Nerd Font`][nerdfonts] 也是以包含許多icon聞名 這邊我們用作者推薦的 [`Meslo LGM NF`][Meslo] 下載並安裝完字體後 回到 Windows終端機 點開設定  點開json檔案  把 `fontFace` 修改成要的字體名稱 ```json=n { "profiles": { "defaults": { "fontFace": "MesloLGM Nerd Font" } } } ``` 主題更改 --- https://terminalsplash.com/ 這裡面有很多顏色主題主題可以選擇 更改的方式也是要到json檔案裡面改 這邊我就不多做說明了 Oh My Posh主題更改 --- 利用下列指令查看所有主題 ```shell=n Get-PoshThemes ``` 接著輸入下列指令去更改 ```shell=n Set-PoshPrompt -Theme <主題名稱> ``` [nerdfonts]: https://www.nerdfonts.com/ [Meslo]: https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Meslo.zip
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up