windows terminal 是今年微軟Build大會上推出的一款的全新終端,用來代替cmder之類的第三方終端。具備亞克力透明、多標籤、Unicode支持(中文,Emoji)、自帶等寬字體等這些特性。
如今能夠在微軟商店裏面進行安裝,系統要求是win10 1903及以上,不過目前仍是preview的,可能有些bug,可是我用着還沒遇到過。git
點擊直接安裝便可,先打開來瞅瞅長啥樣。
說實話看着有點醜,接下來就讓咱們來美化它吧~程序員
Windows Terminal提供了許多設置和配置選項,能夠對Terminal的外觀自定義設置。配置文件格式爲json,對於程序員來講很友好。
打開設置shell
{ "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__8wekyb3d8bbwejson
"defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}"
將defaultProfile設置成profile的guid值便可,我設置爲了wsl的guidwindows
"fontFace": "DejaVu Sans Mono"
"acrylicOpacity": 0.5, "useAcrylic": true, "backgroundImage": "C:\\Users\\Kira Yoshikage\\Pictures\\wallhaven-36230.png", "backgroundImageOpacity": 0.75, "backgroundImageStretchMode": "fill"
{ "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" ] } }