Windows 10 終端機中的黑白主題

Windows 10 終端機中的黑白主題

我剛剛安裝了新的 Windows 10 終端機。這簡直太棒了。我想將主題改為白底黑字(目前是黑底白字)。有可用的配置嗎?我有一些配置

  1. 坎貝爾
  2. 日光照射
  3. 曬黑等

我想要簡單的膩子(黑底白字)主題

答案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*/
    ]

從那裡,您可以將新模式新增至模式陣列中,然後按名稱選擇它們。

相關內容