Saturday, May 30, 2020

Windows Terminal

Command Prompt isn't great, so Windows Terminal is welcome.

However, as with VSCode, it feels a little clunky to use and setup, primarily due to the use of a JSON file to hold the settings.This file is (unhelpfully) found at

%USERPROFILE%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState

Settings are documented at Terminal Documentation, but the key settings are documented here:


{
    ...
 
    "initialCols": 100,
    "initialRows": 64,
    "initialPosition": "80,10",

    "profiles":
    {
        "defaults":
        {
           "fontSize": 9,
           // or consolas...
           "fontFace": "Cascadia Code",
           "useAcrylic" : true,
           "acrylicOpacity" : 0.85,
           "closeOnExit": true
        },
        "list":
        [
            {
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false,
                "colorScheme": "One Half Dark"
            },
            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl",
                "hidden": false,
                "colorScheme": "Solarized Dark",
                "startingDirectory":"//wsl$/Ubuntu/home/paul/"

            },
            {
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "Command Prompt",
                "commandline": "cmd.exe",
                "hidden": false,
                "fontFace": "consolas",
                "fontSize": "16"
            }
        ]
    }
}

Useful keys are:

  • ctrl+shift+f Search
  • alt+shift++ Create vertical pane
  • alt+shift+- Create horizontal pane
  • alt+arrow Navigate between panes
  • alt+shift+arrow Resize focused pane
  • ctrl+shift+w Close pane