今天(2021 年 1 月 29 日)微软正式发布了 Windows Terminal 1.6 版本,新增图形化设置界面,并且与配置文件(settings.json)并存。
启用方法,在配置文件 settings.json 中新增如下代码:
{ "command": { "action": "openSettings", "target": "settingsUI" }, "keys": "ctrl+shift+," },
打开 WT 后,按快捷键“Ctrl+Shift+,”打开图形化设置界面。
目前配置 Windows Terminal 还是通过编辑 settings.json 的方式,图形化设置界面还没有到来,不过微软已经将其提上日程
之前发了 WT 的美化教程,关于配置文件的解释太少
我查看 WT 的官方 Doc 后,将所有的 .json 参数添加了注释(截止到 Preview 1.6 版本,新增启用图形化设置界面代码),如(部分):
// 配置文件
"profiles":
{
// 适用所有配置文件的设置
"defaults":
{
"startingDirectory": "%USERPROFILE%", // 起始目录
"icon": "C:\\Users\\DustinWinFiles\\Pictures\\Java.png", // 图标
"tabTitle": "开始学习啦", // 自定义选项卡标题
"suppressApplicationTitle": true, // 禁止shell更改标题
"fontFace": "Fira Code Retina", // 字体
"fontSize": 12, // 字体大小
"fontWeight": "normal", // 字体粗细
"padding": "8, 8, 8, 8", // 填充(内容距离界面的内部距离)
"antialiasingMode": "cleartype", // 消除文本锯齿
"cursorShape": "bar", // 光标形状
"cursorColor": "#E6FF00", // 光标颜色
//"cursorHeight": 25, // 光标高度("cursorShape"设置为"vintage"时可用)
"altGrAliasing": true, // AltGr别名
"colorScheme": "Ubuntu", // 配色方案
//"selectionBackground": "#0000e6", // 所选内容的背景色(选用"colorScheme"内的)
"useAcrylic": true, // 启用 acrylic(毛玻璃特效)
"acrylicOpacity": 0.25, // Acrylic 不透明度
"backgroundImage": "C:\\Users\\DustinWinFiles\\Pictures\\colorful.jpg", // 背景图像设置
"backgroundImageStretchMode": "uniformToFill", // 背景图像拉伸模式
"backgroundImageAlignment": "center", // 背景图像对齐
"backgroundImageOpacity": 0.5, // 背景图像不透明度
"scrollbarState": "visible", // 滚动条可见性
"snapOnInput": true, // 键入时滚动到输入行
"historySize": 9001, // 历史记录大小
"closeOnExit": "graceful", // 退出时配置文件的关闭方式(输入exit退出命令窗口)
//"experimental.retroTerminalEffect": false // 怀旧式终端效果
"alwaysOnTop": true // 始终处于顶部模式
},
完整的 .json 配置文件详解请看:
链接:百度网盘 - settings.json
提取码:ch1j
附上 settings.json 配置文件所在路径:
- Windows
Terminal(普通版):C:\Users[用户名]\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState - Windows Terminal
Preview(预览版):C:\Users[用户名]\AppData\Local\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState