推荐通过Windows Store下载,搜索windows terminal,安装要求Windows OS版本1900及以上。具体的文档说明参考Github Terminal。这里主要针对一些日常的使用以及个性化做一些说明。Windows Terminal当前版本 1.0.1401.0。
Windows terminal的配置文件settings.json结构主要如下:
{
"$schema": "",
"defaultProfile": "",
"profiles": [],
"schemes": [],
"keybindings": []
}
由于Windows Terminal更新比较频繁,其配置文件以及内容可能会有调整。相比较于上一个版本,配置文件更加精简了。这里对一些常用或者与用户个人操作习惯相关的设置做一些说明。
Windows Terminal 可以管理Win10上的终端,包括powershell,cmd,windows子系统(Ubuntu,Debian,OpenSUSE)以及服务器连接(Azure, ssh)等。以powershell为例,在配置文件"profiles"中
{
// Make changes here to the powershell.exe profile
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "PowerShell",
"commandline": "powershell.exe",
"hidden": false,
"fontFace": "Consolas",
"fontSize": 11,
"colorScheme": "AdventureTime",
"useAcrylic": true
},
主题需要在schemes中声明,例如主题AdventureTime,如下。
{
"name": "AdventureTime",
"black": "#050404",
"red": "#bd0013",
"green": "#4ab118",
"yellow": "#e7741e",
"blue": "#0f4ac6",
"purple": "#665993",
"cyan": "#70a598",
"white": "#f8dcc0",
"brightBlack": "#4e7cbf",
"brightRed": "#fc5f5a",
"brightGreen": "#9eff6e",
"brightYellow": "#efc11a",
"brightBlue": "#1997c6",
"brightPurple": "#9b5953",
"brightCyan": "#c8faf4",
"brightWhite": "#f6f5fb",
"background": "#1f1d45",
"foreground": "#f8dcc0"
}
推荐主题iTerm2-Color-Schemes,该项目也有其他软件的主题配色。
{
"command": {
"action": "splitPane",
"split": "vertical",
"splitMode": "duplicate"
},
"keys": "alt+shift+plus"
}
设置"splitMode"为"duplicate",文档描述为: