配置
安装美化的程序和git
支持
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
导入配置并将其永久化
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme Paradox
- 在选择美化类型前可以预览,
Get-PoshThemes
- 然后根据喜好自行选择
Set-PoshPrompt -Theme Paradox
保存效果
打开powershell
配置文件.ps1code $profile
,复制上面的内容
修改配置
-
打开Windows Terminal配置文件,可以在窗口设置里打开
settings.json
-
只需要在
list
里面添加东西即可,在其他地方修改都会报错!
"profiles":
{
"defaults":
{
// Put settings here that you want to apply to all profiles.
},
"list":
[
{
// Make changes here to the powershell.exe profile.
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
//这下面都是添加的配置,备注要删掉
"colorScheme": "Campbell",
"useAcrylic": true,
"closeOnExit":true,
"acrylicOpacity" : 0.75,
"fontFace": "Delugia Nerd Font",
"fontSize":12,
"hidden":false,
},
字体
- 下载字体,我直接去找网站下下载的,
wget
下载报出了个一堆信息,没下载成功,ttf
文件放到C:/Windows/font
里面就行