美化终端WindowsTerminal
文档:https://ohmyposh.dev/docs/installation/windows
下载
# winget安装
winget install JanDeDobbeleer.OhMyPosh -s winget
# 手动安装
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))
# 添加环境变量
$env:Path += ";C:\Users\user\AppData\Local\Programs\oh-my-posh\bin"
# 安装字体
oh-my-posh font install meslo
# 初始化主题
# 用neovim打开Microsoft.PowerShell_profile.ps1文件,
nvim $profile
# 添加
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\space.omp.json" | Invoke-Expression
# 修改主体,把space.omp.json,替换成要改的主体即可
# 如:amro.omp.json等
修改windows terminal配置文件的字体
{
"profiles":
{
"defaults":
{
"font":
{
"face": "MesloLGM Nerd Font"
}
}
}
}