Windows Terminal + oh-my-posh 终端环境

目录
1 Windows Terminal 安装
Scoop
scoop bucket add extras
scoop install windows-terminalwinget
winget install --id Microsoft.WindowsTerminal -e- 如果都无法安装可以进入这里下载:https://github.com/microsoft/terminal/releases
2 安装 oh-my-posh
Scoop
scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.jsonwinget
winget install JanDeDobbeleer.OhMyPosh -s winget如果都无法安装可以进入这里下载:https://ohmyposh.dev/docs/installation/windows
安装
ryanoasis/nerd-fonts字体- 请进入这里下载:https://github.com/ryanoasis/nerd-fonts
3 打开 Windows Terminal 修改字体
- 设置 > 默认值 > 外观 > 字体
4 选择一个你想要的主题
这里我分享 6 个我比较喜欢的.
- 1)aliens

- 2)amro

- 3)emodipt-extend

- 4)montys

- 5)stelbent-compact

- 6)slimfat

5 应用主题
- 在终端输入
$env:POSH_THEMES_PATH\aliens.omp.json:后面的aliens就是你的主题名字
oh-my-posh init pwsh --config $env:POSH_THEMES_PATH\aliens.omp.json | Invoke-Expression6 全局主题
# 创建配置文件
$ New-Item -Path $PROFILE -Type File -Force
# 编辑配置文件
$ notepad $PROFILE
# 输入设置
oh-my-posh init pwsh --config $env:POSH_THEMES_PATH\slimfat.omp.json | Invoke-Expression