windows terminal 是今年微軟Build大會上推出的一款的全新終端,用來代替cmder之類的第三方終端。具有亞克力透明、多標簽、Unicode支持(中文,Emoji)、自帶等寬字體等這些特性。 現在可以在微軟商店裡面進行安裝,系統要求是win10 1903及以上,不過目前還是previ ...
windows terminal 是今年微軟Build大會上推出的一款的全新終端,用來代替cmder之類的第三方終端。具有亞克力透明、多標簽、Unicode支持(中文,Emoji)、自帶等寬字體等這些特性。
現在可以在微軟商店裡面進行安裝,系統要求是win10 1903及以上,不過目前還是preview的,可能有些bug,但是我用著還沒遇到過。
點擊直接安裝即可,先打開來瞅瞅長啥樣。
說實話看著有點醜,接下來就讓我們來美化它吧~
自定義配置
Windows Terminal提供了許多設置和配置選項,可以對Terminal的外觀自定義設置。配置文件格式為json,對於程式員來說很友好。
打開設置
{
"globals" :
{
"alwaysShowTabs" : true,
"copyOnSelect" : false,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
...
],
"requestedTheme" : "system",
"showTabsInTitlebar" : true,
"showTerminalTitleInTitlebar" : true,
"wordDelimiters" : " ./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}~?\u2502"
},
"profiles" :
[
{
"acrylicOpacity" : 0.5,
"background" : "#012456",
"closeOnExit" : true,
"colorScheme" : "Campbell",
"commandline" : "powershell.exe",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Consolas",
"fontSize" : 10,
"guid" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
"name" : "Windows PowerShell",
"padding" : "0, 0, 0, 0",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : false
},
...
],
"schemes" :
[
...
]
}
結構很簡單,globals是全局設置,profiles是各個不同的shell的配置,schemes是配色的方案, ms-appx:///xxx 指的是應用程式包的xxx文件,在我電腦上對應的路徑是C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.4.2382.0_x64__8wekyb3d8bbwe
設置預設shell
"defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}"
將defaultProfile設置成profile的guid值即可,我設置為了wsl的guid
設置字體
"fontFace": "DejaVu Sans Mono"
設置背景圖
"acrylicOpacity": 0.5,
"useAcrylic": true,
"backgroundImage": "C:\\Users\\Kira Yoshikage\\Pictures\\wallhaven-36230.png",
"backgroundImageOpacity": 0.75,
"backgroundImageStretchMode": "fill"
設置schemes
{
"schemes": [
{
"name": "Campbell",
"foreground": "#F2F2F2",
"background": "#0C0C0C",
"colors": [
"#0C0C0C",
"#C50F1F",
"#13A10E",
"#C19C00",
"#0037DA",
"#881798",
"#3A96DD",
"#CCCCCC",
"#767676",
"#E74856",
"#16C60C",
"#F9F1A5",
"#3B78FF",
"#B4009E",
"#61D6D6",
"#F2F2F2"
]
},
{
"name": "Solarized Dark",
"foreground": "#FDF6E3",
"background": "#073642",
"colors": [
"#073642",
"#D30102",
"#859900",
"#B58900",
"#268BD2",
"#D33682",
"#2AA198",
"#EEE8D5",
"#002B36",
"#CB4B16",
"#586E75",
"#657B83",
"#839496",
"#6C71C4",
"#93A1A1",
"#FDF6E3"
]
},
{
"name": "Solarized Light",
"foreground": "#073642",
"background": "#FDF6E3",
"colors": [
"#073642",
"#D30102",
"#859900",
"#B58900",
"#268BD2",
"#D33682",
"#2AA198",
"#EEE8D5",
"#002B36",
"#CB4B16",
"#586E75",
"#657B83",
"#839496",
"#6C71C4",
"#93A1A1",
"#FDF6E3"
]
},
{
"name": "Ubuntu",
"foreground": "#EEEEEC",
"background": "#2C001E",
"colors": [
"#EEEEEC",
"#16C60C",
"#729FCF",
"#B58900",
"#268BD2",
"#D33682",
"#2AA198",
"#EEE8D5",
"#002B36",
"#CB4B16",
"#586E75",
"#657B83",
"#839496",
"#6C71C4",
"#93A1A1",
"#FDF6E3"
]
},
{
"name": "UbuntuLegit",
"foreground": "#EEEEEE",
"background": "#2C001E",
"colors": [
"#4E9A06",
"#CC0000",
"#300A24",
"#C4A000",
"#3465A4",
"#75507B",
"#06989A",
"#D3D7CF",
"#555753",
"#EF2929",
"#8AE234",
"#FCE94F",
"#729FCF",
"#AD7FA8",
"#34E2E2",
"#EEEEEE"
]
}
}