注意: 全程使用管理员权限的 Powershell,如果安装遇到问题,可以将 vpn 切换到全局模式
- 打开管理员权限的 Powershell
- 执行:
set-executionpolicy remotesigned
- 安装 Chocolatey,执行:
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
- 安装 colortool,执行:
choco install colortool
- 执行:
Install-Module posh-git -Scope CurrentUser
- 执行:
Install-Module oh-my-posh -Scope CurrentUser
- 执行:
Install-Module Get-ChildItemColor -Scope CurrentUser -AllowClobber
- 下载ParadoxWindows 文件,并把将下载好的文件放到
C:\Users\当前用户\Documents\WindowsPowerShell\Modules\oh-my-posh\当前版本\Themes
文件夹下 - 下载字体更纱黑体字体 ttf 版,解压后,复制
Sarasa Mono T SC
(4 个字体)粘贴到C:\Windows\Fonts
- 打开 powershell,右击窗口,选择属性,更改字体为
等距更纱黑体 T SC
,将布局中的窗口宽度设为 100,高度设为 30 - 下载主题:Solarized Dark Higher Contrast,将主题复制到
C:\ProgramData\Chocolatey\lib\colortool\content\schemes
,并重命名文件,去掉空格为SolarizedDarkHigherContrast.itermcolors
- 执行:
if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
- 执行:
notepad $PROFILE
- 将下列文字复制到打开的 txt 中,保存并关闭
1 | # $env:PYTHONIOENCODING="utf-8" |
如果背景是粉红色,可以点击属性=>颜色=>背景,选择上图中的背景色即可。
vscode
打开设置,搜索terminal font family
,将字体设置为Consolas, 'Courier New', monospace,等距更纱黑体 T SC
,或某种 powerline 字体即可:powerline
Windows Terminal
1 | { |