Windows Terminal美化-简单且实用的配置方案
先上效果图:

首先我们搜索powershell打开(此教程所有软件记得要以管理员模式运行)

首先第一步我们需要一个package manager,在powershell中输入
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
或访问Chocolatey Software | Chocolatey - The package manager for Windows点击Get Started,找到图中位置点击右边复制按钮粘贴到powershell中

安装好上面的chocolatey以后接下来安装oh-my-posh,oh-my-posh简单来说就是模仿oh-my-zsh的一个主题,github项目地址:GitHub - JanDeDobbeleer/oh-my-posh: A prompt theming engine for Powershell
先在PowerShell中输入choco install ConEmu来安装ConEmu,提示是否安装时输入Y确认安装即可,很多Terminal都是以ConEmu为基础来美化的
接着分别输入下面两条指令后回车(提示确认之类的一直输入Y即可)
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
以上两条执行完成以后接着输入
if(!(Test-Path -Path $PROFILE)) { New-Item -Type File -Path $PROFILE -Force }
上面的代码为PowerShell生成一个自定义的Profile,用来配置PowerShell,完成以后如下图

接着用记事本打开上面的文件,PowerShell中输入
notepad $PROFILE
然后在里面添加下面三行代码:
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
Set-Theme Paradox是将主题设置为Paradox,更多主题访问oh-my-posh的GitHub:GitHub - JanDeDobbeleer/oh-my-posh: A prompt theming engine for Powershell,里面有详细的说明
接着输入
set-executionpolicy remotesigned
告诉PowerShell要运行我们刚才所自定义的脚本,如果提示下图错误:

可能要输入set-executionpolicy remotesigned -Scope Process -Force来强制使Process的执行策略更改为remotesigned(尚不清楚会带来什么后果,介意勿改)
执行完成以后重启PowerShell就可以看到效果了

接下来下载字体(用以显示主题中的一些特殊字符),地址https://github.com/adam7/delugia-code/releases/download/v1910.04.1/Delugia.Nerd.Font.Complete.ttf,安装后打开Windows Terminal,按住【Ctrl+,】打开配置文件,在如下位置添加下面几行代码:

"colorScheme": "Campbell",
"useAcrylic": true,
"closeOnExit": false,
"acrylicOpacity": 0.6,
"fontFace": "Delugia Nerd Font",
保存即可。效果图如下:

另外如果感觉系统主题是浅色时terminal上面的栏会变成白色影响美观的话,可以【Ctrl+,】打开配置文件在如图所示位置添加代码:

Terminal的主题颜色就会变成黑色而不随着系统主题颜色的改变而改变了