簡介
船新版本
一、安裝
Microsoft Store中搜索安裝即可,初始狀態如下:
二、配置
1.了解配置文件
Windows Terminal通過settings.json來自定義配置
- globals 「全局配置」
- profiles 「各個終端信息」
- schemes 「配置方案」
- keybindings 「按鍵綁定」
- etc.
2.修改profiles
- wt -> Windows Terminal
- 添加其他終端大同小異
- 更多配置信息參考官網
比如;添加git-bash到wt中,添加如下一份profile放到profiles的list下面「目錄需要改為自己的」
{
"guid" : "{6c68609c-0e39-4fc8-bfa5-dec9c9ab0cd3}",
"name" : "Git-Bash",
"commandline" : "D:\\Files\\git\\Git\\bin\\bash.exe",
"icon" : "D:\\Files\\windows_terminal\\icon\\git-bash.jpg",
"startingDirectory" : "%USERPROFILE%",
"hidden": false
}
比如:添加雲服務器到wt中
{
"guid": "{c2b7c779-0f4f-4476-bfa5-313b42c9851a}",
"hidden": false,
"name": "ecs",
"commandline": "ssh -i C:\\Users\\[xxx]\\.ssh\\[xxx].pem root@192.168.0.1 -p 22"
}
3.修改schemes
選擇好主題UltraViolent,復制到schemes下面,然后在profiles中的default中添加,重新打開wt看下效果
"colorScheme": "UltraViolent"
三、進一步配置
實際上就是添加一些常用的配置到JSON中
四、添加WT到右鍵菜單
新建一個reg文件,編輯好后,右鍵運行
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows Terminal Here"
"Icon"="%USERPROFILE%\\AppData\\Local\\Windows_Terminal_Icon\\windows_terminal.ico"
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="C:\\Users\\[USERNAME]\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"
❗注意:
- 下面的
[USERNAME]
替換成自己的用戶名- 目錄路徑使用雙反斜線
\\
- Icon目錄可以自定義位置,不要誤刪就行 Windows Terminal Icon下載地址
❓報錯:
解決錯誤:
shell\wt\command
下面的@是不能使用環境變量USERPROFILE
的,改成絕對路徑名就OK了「但是Icon中是可以使用環境變量的」
五、一些問題
1.亞克力沒有效果
系統設置 -> Color -> Open Transparency effects