以下配置和修改仅供参考,不具有普适性;还请阅读微软官方文档进修改。
安装Windows Terminal
安装使用要求系统是win10 1903及以上,直接在微软商店搜索下载安装即可。

配置使用Windows Terminal
Windows Terminal提供了许多设置和配置选项,可以对Terminal的外观自定义设置,配置文件格式为json,设置起来还是很友好的。
配置PWS
Win10自带的Windows PowerShell是5.1的,我们需要安装新版的 Windows PowerShell
默认或自定义安装后,打开 Windows Terminal的设置文件
将 profiles下的 PowerShell 配置修改为
{ "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "PowerShell", "commandline": "D:/Program Files/PowerShell/7-preview/pwsh.exe", "colorScheme": "Gruvbox Dark", "backgroundImage" :"D:/xxx/backgroud/Win104k.png", "hidden": false },
|
配置Git bash
先安装Git。
如果你也像我一样使用的是hexo博客,那么Git肯定已经安装好了。
在Windows Terminal中打开设置文件
在 profiles下配置
{ "guid": "{087a9f7c-b287-422f-a447-93f740bab0a4}", "name": "Git", "commandline": "D:/Program Files/Git/bin/bash.exe", "colorScheme": "Gruvbox Dark", "icon" : "D:/xxx/backgroud/bash.png", "backgroundImage" :"D:/xxx/backgroud/Bg.webp", "hidden": false, "acrylicOpacity": 0.75 },
|
配置SSH
同样打开在 Windows Terminal中打开设置文件
在 profiles下配置
{ "acrylicOpacity" : 0.5, "closeOnExit" : true, "colorScheme" : "Gruvbox Dark", "commandline" : "ssh name@IP", "backgroundImage" :"D:/xxx/backgroud/scaled.png", "cursorColor": "#FFFFFF", "cursorShape" : "bar", "fontFace" : "Consolas", "fontSize" : 14, "guid" : "{1bc9cb29-ffb1-4acc-8648-77c52193c26a}", "icon" : "D:/xxx/backgroud/huaweicloud.png", "historySize" : 9001, "name" : "Huawei Cloud", "padding" : "0, 0, 0, 0", "snapOnInput" : true, "startingDirectory" : "", "useAcrylic" : false },
|
附加: guid生成器
添加至右键菜单
下载一个Terminal图标

新建一个.reg
注册表文件,其文件内容:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt] @="Open Windows Terminal Here" "Icon"="D:\\xxx\\backgroud\\terminal.ico" //路径不能有中文
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command] @="C:\\Users\\xxx\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe" //xxx为用户名
|
双击将值写入注册表即可。
美化Windows Terminal
在schemes处增加主题并调用。
"schemes": [ { "name": "Gruvbox Dark", "black": "#1e1e1e", "red": "#be0f17", "green": "#868715", "yellow": "#cc881a", "blue": "#377375", "purple": "#a04b73", "cyan": "#578e57", "white": "#978771", "brightBlack": "#7f7061", "brightRed": "#f73028", "brightGreen": "#aab01e", "brightYellow": "#f7b125", "brightBlue": "#719586", "brightPurple": "#c77089", "brightCyan": "#7db669", "brightWhite": "#e6d4a3", "background": "#1e1e1e", "foreground": "#4d4dff" }, { "name": "AtomOneLight", "black": "#000000", "red": "#de3e35", "green": "#3f953a", "yellow": "#d2b67c", "blue": "#2f5af3", "purple": "#950095", "cyan": "#3f953a", "white": "#bbbbbb", "brightBlack": "#000000", "brightRed": "#de3e35", "brightGreen": "#3f953a", "brightYellow": "#d2b67c", "brightBlue": "#2f5af3", "brightPurple": "#a00095", "brightCyan": "#3f953a", "brightWhite": "#ffffff", "background": "#f9f9f9", "foreground": "#2a2c33" }, ],
|
在 profiles下的各配置中用调用"colorScheme" : "Gruvbox Dark"
即可,如上述 各配置项 所示。
更多主题下载: 【Windows Terminal Themes】
最终效果




毕竟….ε=ε=ε=┏(゜ロ゜;)┛逃
