log_2020_0124: windows terminal (preview)再尝试

作为预览版本,wt没有给GUI界面的配置,想要个性化就只能自己修改profile.json文件,不过自由度还挺高的, 如果直接使用vscode编辑,那么TabNine等插件会根据此预置值给出很全的联想补全,具体可以参考下面列出的教程.
后一个教程还包括了如何配置win下右键菜单"在此处打开"的选项, 操作与注册表有关(关键步骤:设置StartingDirectory属性的值为./).

Windows Terminal 安装与配置指南 - PRIN BLOG
新发布的Windows Terminal如何添加到右键菜单? - 知乎

下面给出一个自用配置作为示例(主题配色为个人偏好的Solarized-Light):

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile": "{6f9994f0-4403-5e85-9cce-98e5da3839bb}",//将wsl设置为默认shell
    "wordDelimiters": " /\()"'-.,:;<>~!@#$%^&*|+=[]{}~?u2502",
    "copyOnSelect": true,
    "profiles": [
        {
            // Make changes here to the powershell.exe profile
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false,
            "startingDirectory": "./"
        },
        {
            // Make changes here to the cmd.exe profile
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",
            "hidden": false,
            "startingDirectory": "./"
        },
        {
            "guid": "{6f9994f0-4403-5e85-9cce-98e5da3839bb}",
            "hidden": false,
            "name": "Ubuntu-16.04",
            "source": "Windows.Terminal.Wsl",
            "fontFace": "Cascadia Code",//微软针对wt项目发布的一款开源编程字体
            "fontSize": 11,
            "useAcrylic": true,//打开背景亚克力效果
            "acrylicOpacity": 0.53,//背景亚克力效果透明度
            "colorScheme": "Solarized Light",
            "startingDirectory": "./"//与右键菜单配置有关的项目
        },
        {
            "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
            "hidden": false,
            "name": "Azure Cloud Shell",
            "source": "Windows.Terminal.Azure",
            "startingDirectory": "./"
        }
    ],
    // Add custom color schemes to this array
    "schemes": [
        {
            "name": "Atom",//Atom系配色
            "black": "#000000",
            "red": "#fd5ff1",
            "green": "#87c38a",
            "yellow": "#ffd7b1",
            "blue": "#85befd",
            "purple": "#b9b6fc",
            "cyan": "#85befd",
            "white": "#e0e0e0",
            "brightBlack": "#000000",
            "brightRed": "#fd5ff1",
            "brightGreen": "#94fa36",
            "brightYellow": "#f5ffa8",
            "brightBlue": "#96cbfe",
            "brightPurple": "#b9b6fc",
            "brightCyan": "#85befd",
            "brightWhite": "#e0e0e0",
            "background": "#161719",
            "foreground": "#c5c8c6"
        },
        {
            "name": "Solarized Light",//Solarized Light配色
            "black": "#002b36",
            "red": "#dc322f",
            "green": "#859900",
            "yellow": "#b58900",
            "blue": "#268bd2",
            "purple": "#6c71c4",
            "cyan": "#2aa198",
            "white": "#93a1a1",
            "brightBlack": "#657b83",
            "brightRed": "#dc322f",
            "brightGreen": "#859900",
            "brightYellow": "#b58900",
            "brightBlue": "#268bd2",
            "brightPurple": "#6c71c4",
            "brightCyan": "#2aa198",
            "brightWhite": "#4a390b",
            "background": "#fdf6e3",
            "foreground": "#586e75"
        }
    ],
    "requestedTheme": "system",
    // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    "keybindings": []
}
原文地址:https://www.cnblogs.com/ria2020/p/12255876.html