Customise Windows Terminal

Windows Terminal is a modern command-line tool.  It's a great way to set up configure different shells like Command Prompt, PowerShell, Windows Subsystem for Linux (WSL) and more.

It's great being able to open up Windows Terminal and have access to different shells all in one place.

What I also love about it you can customise to look how you would like it and how works for you.  Colour scheme, font, logos, spacing, key shortcuts the full thing.  You have full customisation over that.

Where are the customisation settings?

You can access the settings by click on the down arrow at the top of your screen and then Settings.

Windows Terminal Settings

Within the settings you have access to the JSON configuration file, that stores all the information relating to your setting, the default shell that opens, the colour scheme, fonts used etc are all stored within this JSON file.

Windows Terminal JSON file location

My configuration

Today I want to share with you how to setup the configuration and what my setup looks like.  You can find my JSON file configuration here or below.

// This file was initially generated by Windows Terminal 1.4.3243.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.

// 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}",

// You can add more global application settings here.
// To learn more about global settings, visit https://aka.ms/terminal-global-settings

// If enabled, selections are automatically copied to your clipboard.
"copyOnSelect": false,

// If enabled, formatted data is also copied to your clipboard
"copyFormatting": false,

// A profile specifies a command to execute paired with information about how it should look and feel.
// Each one of them will appear in the 'New Tab' dropdown,
//   and can be invoked from the commandline with `wt.exe -p xxx`
// To learn more about profiles, visit https://aka.ms/terminal-profile-settings
"profiles":
{
    "defaults":
    {
        // Put settings here that you want to apply to all profiles.
    },
    "list":
    [
        {
            // Make changes here to the powershell.exe profile.
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false,
            "acrylicOpacity": 0.8,
            "backgroundImage": "C:/unicornlogo.png",
            "useAcrylic": true,
            "backgroundImageOpacity" : 0.1,
            "colorScheme": "Cobalt2"
        },
        {
            // Make changes here to the cmd.exe profile.
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "Command Prompt",
            "commandline": "cmd.exe",
            "hidden": false,
            "acrylicOpacity": 0.8,
            "backgroundImage": "C:/unicornlogo.png",
            "useAcrylic": true,
            "backgroundImageOpacity" : 0.1
        },
        {
            "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
            "hidden": false,
            "name": "Azure Cloud Shell",
            "source": "Windows.Terminal.Azure",
            "acrylicOpacity": 0.8,
            "backgroundImage": "C:/unicornlogo.png",
            "useAcrylic": true,
            "backgroundImageOpacity" : 0.1,
            "colorScheme": "Frost"
        },
        {
            "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
            "hidden": false,
            "name": "Ubuntu",
            "source": "Windows.Terminal.Wsl",
            "acrylicOpacity": 0.8,
            "backgroundImage": "C:/unicornlogo.png",
            "useAcrylic": true,
            "backgroundImageOpacity" : 0.1,
            "colorScheme": "Raspberry"
        }
    ]
},

// Add custom color schemes to this array.
// To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
"schemes": [
    {
        // Color Scheme: Raspberry
                "name" : "Raspberry",
                "background" : "#3C0315",
                "black" : "#282A2E",
                "blue" : "#0170C5",
                "brightBlack" : "#676E7A",
                "brightBlue" : "#80c8ff",
                "brightCyan" : "#8ABEB7",
                "brightGreen" : "#B5D680",
                "brightPurple" : "#AC79BB",
                "brightRed" : "#BD6D85",
                "brightWhite" : "#FFFFFD",
                "brightYellow" : "#FFFD76",
                "cyan" : "#3F8D83",
                "foreground" : "#FFFFFD",
                "green" : "#76AB23",
                "purple" : "#7D498F",
                "red" : "#BD0940",
                "white" : "#FFFFFD",
                "yellow" : "#E0DE48"
    }, 
    {
        // Color Scheme: Frost
            "name" : "Frost",
            "background" : "#FFFFFF",
            "black" : "#3C5712",
            "blue" : "#17b2ff",
            "brightBlack" : "#749B36",
            "brightBlue" : "#27B2F6",
            "brightCyan" : "#13A8C0",
            "brightGreen" : "#89AF50",
            "brightPurple" : "#F2A20A",
            "brightRed" : "#F49B36",
            "brightWhite" : "#741274",
            "brightYellow" : "#991070",
            "cyan" : "#3C96A6",
            "foreground" : "#000000",
            "green" : "#6AAE08",
            "purple" : "#991070",
            "red" : "#8D0C0C",
            "white" : "#6E386E",
            "yellow" : "#991070"
    },
    {
        // Color Scheme: Cobalt2
            "name" : "Cobalt2",
            "background": "#193549",
            "black": "#000000",
            "blue": "#1478DB",
            "brightBlack": "#808080",
            "brightBlue": "#1478DB",
            "brightCyan": "#00ffff",
            "brightGreen": "#33ff00",
            "brightPurple": "#cc00ff",
            "brightRed": "#ff0000",
            "brightWhite": "#ffffff",
            "brightYellow": "#ffff00",
            "cyan": "#00c5c7",
            "foreground": "#c7c7c7",
            "green": "#3AD900",
            "name": "Cobalt2",
            "purple": "#ff2c70",
            "red": "#ff2600",
            "white": "#c7c7c7",
            "yellow": "#ffc600"
    }
],

// Add custom actions and keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings
"actions":
[
    // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
    // These two lines additionally bind them to Ctrl+C and Ctrl+V.
    // To learn more about selection, visit https://aka.ms/terminal-selection
    { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
    { "command": "paste", "keys": "ctrl+v" },

    // Press Ctrl+Shift+F to open the search box
    { "command": "find", "keys": "ctrl+shift+f" },

    // Press Alt+Shift+D to open a new pane.
    // - "split": "auto" makes this pane open in the direction that provides the most surface area.
    // - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
    // To learn more about panes, visit https://aka.ms/terminal-panes
    { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" }
]

}

Profile customisation

I have four shells setup within my Windows Terminal, PowerShell, Command Prompt, Azure Cloud Shell and Ubuntu.  Each shell has a slightly different configuration set up.

If you scroll down to the profile section of the JSON file you will see the profiles, part this is where you can set the font, colour scheme, background image etc for your shells.

Windows Terminal Profile config
        {
            // Make changes here to the powershell.exe profile.
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false,
            "acrylicOpacity": 0.8,
            "backgroundImage": "C:/unicornlogo.png",
            "useAcrylic": true,
            "backgroundImageOpacity" : 0.1,
            "colorScheme": "Cobalt2"
        },

The above code is my PowerShell window configuration, you can see I have a background image setup, I have it set up so the background image isn't to bold and I have a custom colour (color?) scheme setup for that shell.

And I have that setup for each of my shell windows, so that each look different.

Colour Schemes

Beyond the profiles section there is a section for colour schemes.  Within here I have setup some custom ones, and these are ones that are readily available on the web, I haven't created them from scratch. 😉 I am using Raspberry and Frost and Cobalt2.  

Custom Actions and Key Shortcuts

The last section within JSON file is about configure any custom key shortcuts or actions you want.  I haven't configured anything within this section but this is the place you want to use if say you wanted to change the shortcut for opening the search box.

My Windows Terminal