mowatermelon / learn-es6

一个有趣的人写的有趣的前端基础
http://blog.iiwhy.cn/learn-es6
7 stars 5 forks source link

2020/01/10 window 10 terminal #84

Open mowatermelon opened 4 years ago

mowatermelon commented 4 years ago

defaults.json

https://github.com/microsoft/terminal/

// THIS IS AN AUTO-GENERATED FILE! Changes to this file will be ignored.
{
    "alwaysShowTabs": true,
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "initialCols": 120,
    "initialRows": 30,
    "requestedTheme": "system",
    "showTabsInTitlebar": true,
    "showTerminalTitleInTitlebar": true,
    "wordDelimiters": " /\\()\"'-.,:;<>~!@#$%^&*|+=[]{}~?\u2502",

    "profiles":
    [
        {
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false,
            "startingDirectory": "%USERPROFILE%",
            "closeOnExit": true,
            "colorScheme": "Campbell Powershell",
            "cursorColor": "#FFFFFF",
            "cursorShape": "bar",
            "fontFace": "Consolas",
            "fontSize": 12,
            "historySize": 9001,
            "icon": "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png",
            "padding": "8, 8, 8, 8",
            "snapOnInput": true,
            "useAcrylic": false
        },
        {
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",
            "hidden": false,
            "startingDirectory": "%USERPROFILE%",
            "closeOnExit": true,
            "colorScheme": "Campbell",
            "cursorColor": "#FFFFFF",
            "cursorShape": "bar",
            "fontFace": "Consolas",
            "fontSize": 12,
            "historySize": 9001,
            "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
            "padding": "8, 8, 8, 8",
            "snapOnInput": true,
            "useAcrylic": false
        }
    ],
    "schemes":
    [
        {
            "name": "Campbell",
            "foreground": "#CCCCCC",
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "red": "#C50F1F",
            "green": "#13A10E",
            "yellow": "#C19C00",
            "blue": "#0037DA",
            "purple": "#881798",
            "cyan": "#3A96DD",
            "white": "#CCCCCC",
            "brightBlack": "#767676",
            "brightRed": "#E74856",
            "brightGreen": "#16C60C",
            "brightYellow": "#F9F1A5",
            "brightBlue": "#3B78FF",
            "brightPurple": "#B4009E",
            "brightCyan": "#61D6D6",
            "brightWhite": "#F2F2F2"
        },
        {
            "name": "Campbell Powershell",
            "foreground": "#CCCCCC",
            "background": "#012456",
            "black": "#0C0C0C",
            "red": "#C50F1F",
            "green": "#13A10E",
            "yellow": "#C19C00",
            "blue": "#0037DA",
            "purple": "#881798",
            "cyan": "#3A96DD",
            "white": "#CCCCCC",
            "brightBlack": "#767676",
            "brightRed": "#E74856",
            "brightGreen": "#16C60C",
            "brightYellow": "#F9F1A5",
            "brightBlue": "#3B78FF",
            "brightPurple": "#B4009E",
            "brightCyan": "#61D6D6",
            "brightWhite": "#F2F2F2"
        },
        {
            "name": "Vintage",
            "foreground": "#C0C0C0",
            "background": "#000000",
            "black": "#000000",
            "red": "#800000",
            "green": "#008000",
            "yellow": "#808000",
            "blue": "#000080",
            "purple": "#800080",
            "cyan": "#008080",
            "white": "#C0C0C0",
            "brightBlack": "#808080",
            "brightRed": "#FF0000",
            "brightGreen": "#00FF00",
            "brightYellow": "#FFFF00",
            "brightBlue": "#0000FF",
            "brightPurple": "#FF00FF",
            "brightCyan": "#00FFFF",
            "brightWhite": "#FFFFFF"
        },
        {
            "name": "One Half Dark",
            "foreground": "#DCDFE4",
            "background": "#282C34",
            "black": "#282C34",
            "red": "#E06C75",
            "green": "#98C379",
            "yellow": "#E5C07B",
            "blue": "#61AFEF",
            "purple": "#C678DD",
            "cyan": "#56B6C2",
            "white": "#DCDFE4",
            "brightBlack": "#5A6374",
            "brightRed": "#E06C75",
            "brightGreen": "#98C379",
            "brightYellow": "#E5C07B",
            "brightBlue": "#61AFEF",
            "brightPurple": "#C678DD",
            "brightCyan": "#56B6C2",
            "brightWhite": "#DCDFE4"
        },
        {
            "name": "One Half Light",
            "foreground": "#383A42",
            "background": "#FAFAFA",
            "black": "#383A42",
            "red": "#E45649",
            "green": "#50A14F",
            "yellow": "#C18301",
            "blue": "#0184BC",
            "purple": "#A626A4",
            "cyan": "#0997B3",
            "white": "#FAFAFA",
            "brightBlack": "#4F525D",
            "brightRed": "#DF6C75",
            "brightGreen": "#98C379",
            "brightYellow": "#E4C07A",
            "brightBlue": "#61AFEF",
            "brightPurple": "#C577DD",
            "brightCyan": "#56B5C1",
            "brightWhite": "#FFFFFF"
        },
        {
            "name": "Solarized Dark",
            "foreground": "#839496",
            "background": "#002B36",
            "black": "#073642",
            "red": "#DC322F",
            "green": "#859900",
            "yellow": "#B58900",
            "blue": "#268BD2",
            "purple": "#D33682",
            "cyan": "#2AA198",
            "white": "#EEE8D5",
            "brightBlack": "#002B36",
            "brightRed": "#CB4B16",
            "brightGreen": "#586E75",
            "brightYellow": "#657B83",
            "brightBlue": "#839496",
            "brightPurple": "#6C71C4",
            "brightCyan": "#93A1A1",
            "brightWhite": "#FDF6E3"
        },
        {
            "name": "Solarized Light",
            "foreground": "#657B83",
            "background": "#FDF6E3",
            "black": "#073642",
            "red": "#DC322F",
            "green": "#859900",
            "yellow": "#B58900",
            "blue": "#268BD2",
            "purple": "#D33682",
            "cyan": "#2AA198",
            "white": "#EEE8D5",
            "brightBlack": "#002B36",
            "brightRed": "#CB4B16",
            "brightGreen": "#586E75",
            "brightYellow": "#657B83",
            "brightBlue": "#839496",
            "brightPurple": "#6C71C4",
            "brightCyan": "#93A1A1",
            "brightWhite": "#FDF6E3"
        }
    ],
    "keybindings":
    [
        { "command": "closePane", "keys": [ "ctrl+shift+w" ] },
        { "command": "closeWindow", "keys": [ "alt+f4" ] },
        { "command": "copy", "keys": [ "ctrl+shift+c" ] },
        { "command": "decreaseFontSize", "keys": [ "ctrl+-" ] },
        { "command": "duplicateTab", "keys": [ "ctrl+shift+d" ] },
        { "command": "increaseFontSize", "keys": [ "ctrl+=" ] },
        { "command": { "action": "moveFocus", "direction": "down" }, "keys": [ "alt+down" ] },
        { "command": { "action": "moveFocus", "direction": "left" }, "keys": [ "alt+left" ] },
        { "command": { "action": "moveFocus", "direction": "right" }, "keys": [ "alt+right" ] },
        { "command": { "action": "moveFocus", "direction": "up" }, "keys": [ "alt+up" ] },
        { "command": "newTab", "keys": [ "ctrl+shift+t" ] },
        { "command": { "action": "newTab", "index": 0 }, "keys": ["ctrl+shift+1"] },
        { "command": { "action": "newTab", "index": 1 }, "keys": ["ctrl+shift+2"] },
        { "command": { "action": "newTab", "index": 2 }, "keys": ["ctrl+shift+3"] },
        { "command": { "action": "newTab", "index": 3 }, "keys": ["ctrl+shift+4"] },
        { "command": { "action": "newTab", "index": 4 }, "keys": ["ctrl+shift+5"] },
        { "command": { "action": "newTab", "index": 5 }, "keys": ["ctrl+shift+6"] },
        { "command": { "action": "newTab", "index": 6 }, "keys": ["ctrl+shift+7"] },
        { "command": { "action": "newTab", "index": 7 }, "keys": ["ctrl+shift+8"] },
        { "command": { "action": "newTab", "index": 8 }, "keys": ["ctrl+shift+9"] },
        { "command": "nextTab", "keys": [ "ctrl+tab" ] },
        { "command": "openNewTabDropdown", "keys": [ "ctrl+shift+space" ] },
        { "command": "openSettings", "keys": [ "ctrl+," ] },
        { "command": "paste", "keys": [ "ctrl+shift+v" ] },
        { "command": "prevTab", "keys": [ "ctrl+shift+tab" ] },
        { "command": "resetFontSize", "keys": ["ctrl+0"]},
        { "command": { "action": "resizePane", "direction": "down" }, "keys": [ "alt+shift+down" ] },
        { "command": { "action": "resizePane", "direction": "left" }, "keys": [ "alt+shift+left" ] },
        { "command": { "action": "resizePane", "direction": "right" }, "keys": [ "alt+shift+right" ] },
        { "command": { "action": "resizePane", "direction": "up" }, "keys": [ "alt+shift+up" ] },
        { "command": "scrollDown", "keys": [ "ctrl+shift+down" ] },
        { "command": "scrollDownPage", "keys": [ "ctrl+shift+pgdn" ] },
        { "command": "scrollUp", "keys": [ "ctrl+shift+up" ] },
        { "command": "scrollUpPage", "keys": [ "ctrl+shift+pgup" ] },
        { "command": "splitHorizontal", "keys": [ "alt+shift+-" ] },
        { "command": "splitVertical", "keys": [ "alt+shift+plus" ] },
        { "command": { "action": "switchToTab", "index": 0 }, "keys": ["ctrl+alt+1"] },
        { "command": { "action": "switchToTab", "index": 1 }, "keys": ["ctrl+alt+2"] },
        { "command": { "action": "switchToTab", "index": 2 }, "keys": ["ctrl+alt+3"] },
        { "command": { "action": "switchToTab", "index": 3 }, "keys": ["ctrl+alt+4"] },
        { "command": { "action": "switchToTab", "index": 4 }, "keys": ["ctrl+alt+5"] },
        { "command": { "action": "switchToTab", "index": 5 }, "keys": ["ctrl+alt+6"] },
        { "command": { "action": "switchToTab", "index": 6 }, "keys": ["ctrl+alt+7"] },
        { "command": { "action": "switchToTab", "index": 7 }, "keys": ["ctrl+alt+8"] },
        { "command": { "action": "switchToTab", "index": 8 }, "keys": ["ctrl+alt+9"] },
        { "command": "toggleFullscreen", "keys": [ "alt+enter" ] },
        { "command": "toggleFullscreen", "keys": [ "f11" ] }
    ]
}
mowatermelon commented 4 years ago

profiles.json


// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
    "$schema": "https://aka.ms/terminal-profiles-schema",

    "defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",

    "profiles":
    [
        {
            // Make changes here to the cmd.exe profile
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",
            "hidden": false
        },
        {
            // Make changes here to the powershell.exe profile
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false
        },

        {
            "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
            "hidden": false,
            "name": "Azure Cloud Shell",
            "source": "Windows.Terminal.Azure"
        }
    ],

    // Add custom color schemes to this array
    "schemes": [],

    // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    "keybindings": []
}
mowatermelon commented 4 years ago

https://github.com/microsoft/terminal/blob/master/doc/cascadia/profiles.schema.json

{
  "$id": "https://github.com/microsoft/terminal/blob/master/doc/cascadia/profiles.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Microsoft's Windows Terminal Settings Profile Schema'",
  "definitions": {
    "Color": {
      "default": "#",
      "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
      "type": "string",
      "format": "color"
    },
    "ProfileGuid": {
      "default": "{}",
      "pattern": "^\\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\\}$",
      "type": "string"
    },
    "ShortcutActionName": {
      "enum": [
        "closePane",
        "closeTab",
        "closeWindow",
        "copy",
        "copyTextWithoutNewlines",
        "decreaseFontSize",
        "duplicateTab",
        "increaseFontSize",
        "moveFocus",
        "moveFocusDown",
        "moveFocusLeft",
        "moveFocusRight",
        "moveFocusUp",
        "newTab",
        "newTabProfile0",
        "newTabProfile1",
        "newTabProfile2",
        "newTabProfile3",
        "newTabProfile4",
        "newTabProfile5",
        "newTabProfile6",
        "newTabProfile7",
        "newTabProfile8",
        "nextTab",
        "openNewTabDropdown",
        "openSettings",
        "paste",
        "prevTab",
        "resetFontSize",
        "resizePane",
        "resizePaneDown",
        "resizePaneLeft",
        "resizePaneRight",
        "resizePaneUp",
        "scrollDown",
        "scrollDownPage",
        "scrollUp",
        "scrollUpPage",
        "splitHorizontal",
        "splitVertical",
        "splitPane",
        "switchToTab",
        "switchToTab0",
        "switchToTab1",
        "switchToTab2",
        "switchToTab3",
        "switchToTab4",
        "switchToTab5",
        "switchToTab6",
        "switchToTab7",
        "switchToTab8",
        "toggleFullscreen"
      ],
      "type": "string"
    },
    "Direction": {
      "enum": [
        "left",
        "right",
        "up",
        "down"
      ],
      "type": "string"
    },
    "SplitState": {
      "enum": [
        "vertical",
        "horizontal"
      ],
      "type": "string"
    },
    "NewTerminalArgs": {
      "properties": {
        "commandline": {
          "description": "A commandline to use instead of the profile's",
          "type": "string"
        },
        "tabTitle": {
          "description": "An initial tabTitle to use instead of the profile's",
          "type": "string"
        },
        "startingDirectory": {
          "description": "A startingDirectory to use instead of the profile's",
          "type": "string"
        },
        "profile": {
          "description": "Either the GUID or name of a profile to use, instead of launching the default",
          "type": "string"
        },
        "index": {
          "type": "integer",
          "description": "The index of the profile in the new tab dropdown to open"
        }
      },
      "type": "object"
    },
    "ShortcutAction": {
      "properties": {
        "action": {
          "description": "The action to execute",
          "$ref": "#/definitions/ShortcutActionName"
        }
      },
      "required": [
        "action"
      ],
      "type": "object"
    },
    "CopyAction": {
      "description": "Arguments corresponding to a Copy Text Action",
      "allOf": [
        { "$ref": "#/definitions/ShortcutAction" },
        {
          "properties": {
            "action": { "type": "string", "pattern": "copy" },
            "trimWhitespace": {
              "type": "boolean",
              "default": true,
              "description": "If true, whitespace is removed and newlines are maintained. If false, newlines are removed and whitespace is maintained."
            }
          }
        }
      ]
    },
    "NewTabAction": {
      "description": "Arguments corresponding to a New Tab Action",
      "allOf": [
        { "$ref": "#/definitions/ShortcutAction" },
        { "$ref": "#/definitions/NewTerminalArgs" },
        {
          "properties": {
            "action": { "type":"string", "pattern": "newTab" }
          }
        }
      ]
    },
    "SwitchToTabAction": {
      "description": "Arguments corresponding to a Switch To Tab Action",
      "allOf": [
        { "$ref": "#/definitions/ShortcutAction" },
        {
          "properties": {
            "action": { "type": "string", "pattern": "switchToTab" },
            "index": {
              "type": "integer",
              "default": 0,
              "description": "Which tab to switch to, with the first being 0"
            }
          }
        }
      ],
      "required": [ "index" ]
    },
    "MoveFocusAction": {
      "description": "Arguments corresponding to a Move Focus Action",
      "allOf": [
        { "$ref": "#/definitions/ShortcutAction" },
        {
          "properties": {
            "action": { "type": "string", "pattern": "moveFocus" },
            "direction": {
              "$ref": "#/definitions/Direction",
              "default": "left",
              "description": "The direction to move focus in, between panes"
            }
          }
        }
      ],
      "required": [ "direction" ]
    },
    "ResizePaneAction": {
      "description": "Arguments corresponding to a Resize Pane Action",
      "allOf": [
        { "$ref": "#/definitions/ShortcutAction" },
        {
          "properties": {
            "action": { "type": "string", "pattern": "resizePane" },
            "direction": {
              "$ref": "#/definitions/Direction",
              "default": "left",
              "description": "The direction to move the pane separator in"
            }
          }
        }
      ],
      "required": [ "direction" ]
    },
    "SplitPaneAction": {
      "description": "Arguments corresponding to a Split Pane Action",
      "allOf": [
        { "$ref": "#/definitions/ShortcutAction" },
        { "$ref": "#/definitions/NewTerminalArgs" },
        {
          "properties": {
            "action": { "type": "string", "pattern": "splitPane" },
            "split": {
              "$ref": "#/definitions/SplitState",
              "default": "vertical",
              "description": "The orientation to split the pane in, either vertical (think [|]) or horizontal (think [-])"
            }
          }
        }
      ],
      "required": [ "split" ]
    },
    "Keybinding": {
      "additionalProperties": false,
      "properties": {
        "command": {
          "description": "The action executed when the associated key bindings are pressed.",
            "oneOf": [
              { "$ref": "#/definitions/CopyAction" },
              { "$ref": "#/definitions/ShortcutActionName" },
              { "$ref": "#/definitions/NewTabAction" },
              { "$ref": "#/definitions/SwitchToTabAction" },
              { "$ref": "#/definitions/MoveFocusAction" },
              { "$ref": "#/definitions/ResizePaneAction" },
              { "$ref": "#/definitions/SplitPaneAction" }
            ]
        },
        "keys": {
          "description": "Defines the key combinations used to call the command.",
          "items": {
            "pattern": "^(?<modifier>(ctrl|alt|shift)\\+?((ctrl|alt|shift)(?<!\\2)\\+?)?((ctrl|alt|shift)(?<!\\2|\\4))?\\+?)?(?<key>[^+\\s]+?)?(?<=[^+\\s])$",
            "type": "string"
          },
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "command",
        "keys"
      ],
      "type": "object"
    },
    "Globals": {
      "additionalProperties": true,
      "description": "Properties that affect the entire window, regardless of the profile settings.",
      "properties": {
        "alwaysShowTabs": {
          "default": true,
          "description": "When set to true, tabs are always displayed. When set to false and showTabsInTitlebar is set to false, tabs only appear after opening a new tab.",
          "type": "boolean"
        },
        "copyOnSelect": {
          "default": false,
          "description": "When set to true, a selection is immediately copied to your clipboard upon creation. When set to false, the selection persists and awaits further action.",
          "type": "boolean"
        },
        "defaultProfile": {
          "$ref": "#/definitions/ProfileGuid",
          "description": "Sets the default profile. Opens by clicking the '+' icon or typing the key binding assigned to 'newTab'. The guid of the desired default profile is used as the value."
        },
        "initialCols": {
          "default": 120,
          "description": "The number of columns displayed in the window upon first load.",
          "maximum": 999,
          "minimum": 1,
          "type": "integer"
        },
        "initialRows": {
          "default": 30,
          "description": "The number of rows displayed in the window upon first load.",
          "maximum": 999,
          "minimum": 1,
          "type": "integer"
        },
        "rowsToScroll": {
          "default": "system",
          "description": "The number of rows to scroll at a time with the mouse wheel. This will override the system setting if the value is not zero or 'system'.",
          "maximum": 999,
          "minimum": 0,
          "type": "integer"
        },
        "keybindings": {
          "description": "Properties are specific to each custom key binding.",
          "items": {
            "$ref": "#/definitions/Keybinding"
          },
          "type": "array"
        },
        "requestedTheme": {
          "default": "system",
          "description": "Sets the theme of the application.",
          "enum": [
            "light",
            "dark",
            "system"
          ],
          "type": "string"
        },
        "showTabsInTitlebar": {
          "default": true,
          "description": "When set to true, the tabs are moved into the titlebar and the titlebar disappears. When set to false, the titlebar sits above the tabs.",
          "type": "boolean"
        },
        "showTerminalTitleInTitlebar": {
          "default": true,
          "description": "When set to true, titlebar displays the title of the selected tab. When set to false, titlebar displays 'Windows Terminal'.",
          "type": "boolean"
        },
        "wordDelimiters": {
          "default": " ./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}~?│",
          "description": "Determines the delimiters used in a double click selection.",
          "type": "string"
        }
      },
      "required": [
        "defaultProfile"
      ],
      "type": "object"
    },
    "Profile": {
      "description": "Properties specific to a unique profile.",
      "additionalProperties": false,
      "properties": {
        "acrylicOpacity": {
          "default": 0.5,
          "description": "When useAcrylic is set to true, it sets the transparency of the window for the profile. Accepts floating point values from 0-1 (default 0.5).",
          "maximum": 1,
          "minimum": 0,
          "type": "number"
        },
        "background": {
          "$ref": "#/definitions/Color",
          "description": "Sets the background color of the profile. Overrides background set in color scheme if colorscheme is set. Uses hex color format: \"#rrggbb\". Default \"#000000\" (black).",
          "type": ["string", "null"]
        },
        "backgroundImage": {
          "description": "Sets the file location of the Image to draw over the window background.",
          "type": "string"
        },
        "backgroundImageAlignment": {
          "default": "center",
          "enum": [
            "bottom",
            "bottomLeft",
            "bottomRight",
            "center",
            "left",
            "right",
            "top",
            "topLeft",
            "topRight"
          ],
          "type": "string"
        },
        "backgroundImageOpacity": {
          "description": "(Not in SettingsSchema.md)",
          "maximum": 1,
          "minimum": 0,
          "type": "number"
        },
        "backgroundImageStretchMode": {
          "default": "uniformToFill",
          "description": "Sets how the background image is resized to fill the window.",
          "enum": [
            "fill",
            "none",
            "uniform",
            "uniformToFill"
          ],
          "type": "string"
        },
        "closeOnExit": {
          "default": "graceful",
          "description": "Sets how the profile reacts to termination or failure to launch. Possible values: \"graceful\" (close when exit is typed or the process exits normally), \"always\" (always close) and \"never\" (never close). true and false are accepted as synonyms for \"graceful\" and \"never\" respectively.",
          "oneOf": [
            {
              "enum": [
                "never",
                "graceful",
                "always"
              ],
              "type": "string"
            },
            {
              "type": "boolean"
            }
          ]
        },
        "colorScheme": {
          "default": "Campbell",
          "description": "Name of the terminal color scheme to use. Color schemes are defined under \"schemes\".",
          "type": "string"
        },
        "colorTable": {
          "description": "Array of colors used in the profile if colorscheme is not set. Colors use hex color format: \"#rrggbb\". Ordering is as follows: [black, red, green, yellow, blue, magenta, cyan, white, bright black, bright red, bright green, bright yellow, bright blue, bright magenta, bright cyan, bright white]",
          "items": {
            "additionalProperties": false,
            "properties": {
              "background": {
                "$ref": "#/definitions/Color",
                "description": "Sets the background color of the color table."
              },
              "black": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI black."
              },
              "blue": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI blue."
              },
              "brightBlack": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI bright black."
              },
              "brightBlue": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI bright blue."
              },
              "brightCyan": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI bright cyan."
              },
              "brightGreen": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI bright green."
              },
              "brightPurple": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI bright purple."
              },
              "brightRed": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI bright red."
              },
              "brightWhite": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI bright white."
              },
              "brightYellow": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI bright yellow."
              },
              "cyan": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI cyan."
              },
              "foreground": {
                "$ref": "#/definitions/Color",
                "description": "Sets the foreground color of the color table."
              },
              "green": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI green."
              },
              "purple": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI purple."
              },
              "red": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI red."
              },
              "white": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI white."
              },
              "yellow": {
                "$ref": "#/definitions/Color",
                "description": "Sets the color used as ANSI yellow."
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "commandline": {
          "description": "Executable used in the profile.",
          "type": "string"
        },
        "connectionType": {
          "$ref": "#/definitions/ProfileGuid",
          "description": "A GUID reference to a connection type. Currently undocumented as of 0.3, this is used for Azure Cloud Shell"
        },
        "cursorColor": {
          "$ref": "#/definitions/Color",
          "default": "#FFFFFF",
          "description": "Sets the cursor color for the profile. Uses hex color format: \"#rrggbb\"."
        },
        "cursorHeight": {
          "description": "Sets the percentage height of the cursor starting from the bottom. Only works when cursorShape is set to \"vintage\". Accepts values from 25-100.",
          "maximum": 100,
          "minimum": 25,
          "type": "integer"
        },
        "cursorShape": {
          "default": "bar",
          "description": "Sets the cursor shape for the profile. Possible values: \"vintage\" ( ▃ ), \"bar\" ( ┃, default ), \"underscore\" ( ▁ ), \"filledBox\" ( █ ), \"emptyBox\" ( ▯ )",
          "enum": [
            "bar",
            "emptyBox",
            "filledBox",
            "underscore",
            "vintage"
          ],
          "type": "string"
        },
        "experimental.retroTerminalEffect": {
          "description": "When set to true, enable retro terminal effects. This is an experimental feature, and its continued existence is not guaranteed.",
          "type": "boolean"
        },
        "fontFace": {
          "default": "Consolas",
          "description": "Name of the font face used in the profile.",
          "type": "string"
        },
        "fontSize": {
          "default": 12,
          "description": "Sets the font size.",
          "minimum": 1,
          "type": "integer"
        },
        "foreground": {
          "$ref": "#/definitions/Color",
          "description": "Sets the foreground color of the profile. Overrides foreground set in color scheme if colorscheme is set. Uses hex color format: \"#rrggbb\". Default \"#ffffff\" (white).",
          "type": ["string", "null"]
        },
        "guid": {
          "$ref": "#/definitions/ProfileGuid",
          "description": "Unique identifier of the profile. Written in registry format: \"{00000000-0000-0000-0000-000000000000}\"."
        },
        "hidden": {
          "default": false,
          "description": "If set to true, the profile will not appear in the list of profiles. This can be used to hide default profiles and dynamicially generated profiles, while leaving them in your settings file.",
          "type": "boolean"
        },
        "historySize": {
          "default": 9001,
          "description": "The number of lines above the ones displayed in the window you can scroll back to.",
          "minimum": -1,
          "type": "integer"
        },
        "icon": {
          "description": "Image file location of the icon used in the profile. Displays within the tab and the dropdown menu.",
          "type": "string"
        },
        "name": {
          "description": "Name of the profile. Displays in the dropdown menu.",
          "minLength": 1,
          "type": "string"
        },
        "padding": {
          "default": "8, 8, 8, 8",
          "description": "Sets the padding around the text within the window. Can have three different formats: \"#\" sets the same padding for all sides, \"#, #\" sets the same padding for left-right and top-bottom, and \"#, #, #, #\" sets the padding individually for left, top, right, and bottom.",
          "pattern": "^-?[0-9]+(\\.[0-9]+)?( *, *-?[0-9]+(\\.[0-9]+)?|( *, *-?[0-9]+(\\.[0-9]+)?){3})?$",
          "type": "string"
        },
        "scrollbarState": {
          "default": "visible",
          "description": "Defines the visibility of the scrollbar.",
          "enum": [
            "visible",
            "hidden"
          ],
          "type": "string"
        },
        "selectionBackground": {
          "$ref": "#/definitions/Color",
          "description": "Sets the selection background color of the profile. Overrides selection background set in color scheme if colorscheme is set. Uses hex color format: \"#rrggbb\"."
        },
        "snapOnInput": {
          "default": true,
          "description": "When set to true, the window will scroll to the command input line when typing. When set to false, the window will not scroll when you start typing.",
          "type": "boolean"
        },
        "source": {
          "description": "Stores the name of the profile generator that originated this profile.",
          "type": "string"
        },
        "startingDirectory": {
          "description": "The directory the shell starts in when it is loaded.",
          "type": "string"
        },
        "suppressApplicationTitle": {
          "description": "When set to `true`, `tabTitle` overrides the default title of the tab and any title change messages from the application will be suppressed. When set to `false`, `tabTitle` behaves as normal.",
          "type": "boolean"
        },
        "tabTitle": {
          "description": "If set, will replace the name as the title to pass to the shell on startup. Some shells (like bash) may choose to ignore this initial value, while others (cmd, powershell) may use this value over the lifetime of the application.",
          "type": "string"
        },
        "useAcrylic": {
          "default": false,
          "description": "When set to true, the window will have an acrylic background. When set to false, the window will have a plain, untextured background.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "ProfileList": {
      "description": "A list of profiles and the properties specific to each.",
      "items": {
        "$ref": "#/definitions/Profile",
        "required": [
          "guid",
          "name"
        ]
      },
      "type": "array"
    },
    "ProfilesObject": {
      "description": "A list of profiles and default settings that apply to all of them",
      "properties": {
        "list": {
          "$ref": "#/definitions/ProfileList"
        },
        "defaults": {
          "description": "The default settings that apply to every profile.",
          "$ref": "#/definitions/Profile"
        }
      },
      "type": "object"
    },
    "SchemeList": {
      "description": "Properties are specific to each color scheme. ColorTool is a great tool you can use to create and explore new color schemes. All colors use hex color format.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "Name of the color scheme.",
            "minLength": 1,
            "type": "string"
          },
          "background": {
            "$ref": "#/definitions/Color",
            "description": "Sets the background color of the color scheme."
          },
          "black": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI black."
          },
          "blue": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI blue."
          },
          "brightBlack": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI bright black."
          },
          "brightBlue": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI bright blue."
          },
          "brightCyan": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI bright cyan."
          },
          "brightGreen": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI bright green."
          },
          "brightPurple": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI bright purple."
          },
          "brightRed": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI bright red."
          },
          "brightWhite": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI bright white."
          },
          "brightYellow": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI bright yellow."
          },
          "cyan": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI cyan."
          },
          "foreground": {
            "$ref": "#/definitions/Color",
            "description": "Sets the foreground color of the color scheme."
          },
          "green": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI green."
          },
          "purple": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI purple."
          },
          "red": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI red."
          },
          "selectionBackground": {
            "$ref": "#/definitions/Color",
            "description": "Sets the selection background color of the color scheme."
          },
          "white": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI white."
          },
          "yellow": {
            "$ref": "#/definitions/Color",
            "description": "Sets the color used as ANSI yellow."
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "oneOf": [
    {
      "allOf": [
        { "$ref": "#/definitions/Globals" },
        {
          "additionalItems": true,
          "properties": {
            "profiles": {
              "oneOf": [
              { "$ref": "#/definitions/ProfileList" },
              { "$ref": "#/definitions/ProfilesObject" }
              ]
            },
            "schemes": { "$ref": "#/definitions/SchemeList" }
          },
          "required": [
            "profiles",
            "schemes",
            "defaultProfile"
          ]
        }
      ]
    },
    {
      "additionalItems": false,
      "properties": {
        "globals": { "$ref": "#/definitions/Globals" },
        "profiles": {
          "oneOf": [
          { "$ref": "#/definitions/ProfileList" },
          { "$ref": "#/definitions/ProfilesObject" }
          ]
        },
        "schemes": { "$ref": "#/definitions/SchemeList" }
      },
      "required": [
        "profiles",
        "schemes",
        "globals"
      ]
    }
  ]
}
mowatermelon commented 4 years ago

参考故事乎配置

https://www.zhihu.com/question/330813656/answer/735410227

// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "profiles": [
        {
            // Make changes here to the cmd.exe profile
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",
            "hidden": false,
            "colorScheme": "Vintage",
            "useAcrylic": true
        },
        {
            // Make changes here to the powershell.exe profile
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false,
            "colorScheme": "Solarized Light",
            "useAcrylic": true
        },
        {
            "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
            "hidden": false,
            "name": "Azure Cloud Shell",
            "source": "Windows.Terminal.Azure"
        }
    ],
    // Add custom color schemes to this array
    "schemes": [
        {
            "name": "Night Owlish Light",
            "background": "#FFFFFF",
            "black": "#011627",
            "blue": "#4876D6",
            "brightBlack": "#7A8181",
            "brightBlue": "#5CA7E4",
            "brightCyan": "#00C990",
            "brightGreen": "#49D0C5",
            "brightPurple": "#697098",
            "brightRed": "#F76E6E",
            "brightWhite": "#989FB1",
            "brightYellow": "#DAC26B",
            "cyan": "#08916A",
            "foreground": "#403F53",
            "green": "#2AA298",
            "purple": "#403F53",
            "red": "#D3423E",
            "white": "#7A8181",
            "yellow": "#DAAA01"
        },
        {
            "name":"Campbell Melon",
            "background" : "#0C0C0C",
            "black" : "#0C0C0C",
            "blue" : "#0037DA",
            "brightBlack" : "#767676",
            "brightBlue" : "#3B78FF",
            "brightCyan" : "#61D6D6",
            "brightGreen" : "#16C60C",
            "brightPurple" : "#B4009E",
            "brightRed" : "#E74856",
            "brightWhite" : "#F2F2F2",
            "brightYellow" : "#F9F1A5",
            "cyan" : "#3A96DD",
            "foreground" : "#CCCCCC",
            "green" : "#13A10E",
            "purple" : "#881798",
            "red" : "#C50F1F",
            "white" : "#CCCCCC",
            "yellow" : "#C19C00"
        }
    ],
    // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    "keybindings": []
}

效果图

powershell

cmd