Windows 10 终端中的白底黑字主题

Windows 10 终端中的白底黑字主题

我刚刚安装了新的 Windows 10 终端。它简直太棒了。我想将主题更改为白底黑字(目前是黑底白字)。有可用的配置吗?我有一些配置

  1. 坎贝尔
  2. 太阳能照明
  3. 日晒黑暗等

我想要简单的 putty(白底黑字)主题

答案1

找到颜色主题https://github.com/mbadolato/iTerm2-Color-Schemes

  1. 下载并解压 zip 文件
  2. 打开“windowsterminal”文件夹
  3. 打开任何文件(.json 格式)
  4. 复制设置并将其粘贴到 Windows 终端设置的“架构”部分

复制后,应该如下所示

// 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": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",

    "profiles":
    [
        {
            // Make changes here to the powershell.exe profile
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false
        },
        {
            // Make changes here to the cmd.exe profile
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",
            "hidden": false
        },
        {
            "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
            "hidden": false,
            "name": "Azure Cloud Shell",
            "source": "Windows.Terminal.Azure"
        },
        {
            "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
            "hidden": false,
            "name": "Ubuntu-18.04",
            "source": "Windows.Terminal.Wsl",
            "acrylicOpacity" : 0.5,
            "closeOnExit" : true,
            "colorScheme" : "AtomOneLight",
            "cursorColor" : "#000000",
            "cursorShape" : "bar",
            "fontFace" : "Consolas",
            "fontSize" : 12,
            "historySize" : 9001,
            "icon" : "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
            "padding" : "0, 0, 0, 0",
            "snapOnInput" : true,
            "useAcrylic" : false
        }
    ],

    // Add custom color schemes to this array
    "schemes": [
        {
            "name": "AtomOneLight",
            "black": "#000000",
            "red": "#de3e35",
            "green": "#3f953a",
            "yellow": "#d2b67c",
            "blue": "#2f5af3",
            "purple": "#950095",
            "cyan": "#3f953a",
            "white": "#bbbbbb",
            "brightBlack": "#000000",
            "brightRed": "#de3e35",
            "brightGreen": "#3f953a",
            "brightYellow": "#d2b67c",
            "brightBlue": "#2f5af3",
            "brightPurple": "#a00095",
            "brightCyan": "#3f953a",
            "brightWhite": "#ffffff",
            "background": "#f9f9f9",
            "foreground": "#2a2c33"
        }
    ],

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

答案2

您可以通过按住 Alt 键并单击设置(设置位于选项卡栏中的下拉菜单中)从 defaults.json 复制配色方案。

复制所有配色方案。然后在您的 settings.json 文件中(只需左键单击设置),将“schemas”数组替换为您在 defaults.json 中复制的数组。您最终应该得到如下结果:

"schemes":
[ 
    {
        "name": "Campbell",
        // ...
    },
    {
        "name": "Campbell Powershell",
        // ...
    },
    // ...
]

然后,再往上,您应该找到一个空的配置文件默认对象。在其中创建一个“colorScheme”属性,并将值设置为所需的架构名称。您最终会得到类似这样的结果:

"profiles":
{
    "defaults":
    {
        // Put settings here that you want to apply to all profiles.
        "colorScheme": "One Half Light"
    },
    "list":
    [ 
        /*...you will see things like cmd, powershell, or ubuntu/WSL profiles here*/
    ]

从那里,您可以将新模式添加到模式数组,然后按名称选择它们。

相关内容