It’s 2020 and you still don’t have Windows Terminal, the latest and coolest emulator?


Introduction to the

Windows Terminal is a new command line program for Windows10 that Microsoft announced at Build 2019. Users can install the software through the Microsoft App Store or download the source code from Github to compile and install the software. The minimum operating system requirements are Windows 10 Build 18362. This program unifies PowerShell, CMD and Windows Linux Subsystem (WSL) environment on Windows.

advantage

  • modernCan be DIYInterface, abandon static terminal style
  • Full font rendering mechanism (Emoji, Chinese)
  • Unified Fluent design style with Windows
  • GPU acceleration
  • Support PowerShell, CMD, and Windows Linux Subsystem (WSL)
  • The default Tab mode eliminates the need to create multiple terminals

First look at a rendering :(various terminals switch freely)



Windows Terminal download address

www.microsoft.com/en-us/p/win…

Start the whole live

Windows Terminal, like VS Code, uses JSON files to configure the relevant options, which are then divided into two files: default configuration files and custom configuration files. You only need to refer to the default configuration and modify the custom configuration file.

Before you start:


  1. You need to modify the file suffix in subsequent operations. If the computer file suffix is hidden, it can be shown in any folder -> View at the top -> check the file extension
  2. The backslash ‘\’ of the file path in JSON needs to be escaped to be recognized, so it needs to be replaced with ‘\\’.
  3. Since Windows uses Notepad by default to open JSON files, you need to change the opening mode to editor before doing so. Create a new text file, change the suffix to.json, then right-click – Open mode – XXX editor

Open the terminal and click the down arrow next to the top TAB to see the “Settings” option. Use Alt + left-click to open the default configuration file. Click the arrow again and directly left-click “Settings” to open the custom configuration file.

The default configuration file is automatically generated as a read-only file. Modifying the default configuration file does not take effect

Let’s start with the default profile framework:

{
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", // Start Settings, width and height mode"initialCols": 120,
    "initialRows": 30."launchMode": "default"// Selection: Changes the replication mode"copyOnSelect": false."copyFormatting": true."wordDelimiters": "/ \ \ \" () '-. :; < > ~! @ # $% ^ & * | + = [] {} ~? \u2502",

    // Tab UI
    "alwaysShowTabs": true."showTabsInTitlebar": true."showTerminalTitleInTitlebar": true."tabWidthMode": "equal"// Miscellaneous"confirmCloseAllTabs": true."theme": "system"."rowsToScroll": "system"."snapToGridOnResize": true, // Which terminals can be started"profiles": [], // List of optional styles"schemes": [], // List of shortcut keys"keybindings": []}Copy the code

Custom profiles, by contrast, have the Defaults object field in Profiles, which places Settings that affect all terminals

"defaults":
    {
        // Put settings here that you want to apply to all profiles.
    }Copy the code

Acrylic effect

First, it is to achieve the acrylic effect. The so-called acrylic, win10 Fluent Design is a kind of effect in the Design language, personal feeling is a pure color background control transparency, its main purpose is to increase the sense of layers. Win10 looks like this (left side effect) :



The Settings are as follows:

// profiles 里的 defaults:
"useAcrylic": true, // Defaults to 0.5 and receives floating point values 0-1"acrylicOpacity": 0.5   Copy the code


Custom Background

You can configure background color, image, transparency, etc

// If background images are configured, the background colors will be overwritten"background": "# 000"// The background image can be a.jpg,.png or.gif file. // Yes, the background image can be a GIF!"backgroundImage": "D:\\ASUS\\Pictures\\ABT40A3B7B4954CF482CA868687C09348666E27CEF9726FDABBF98F54352EB8EAE1.jpg"// Background image transparency"backgroundImageOpacity": 0.7, // Background image stretch mode, accepted"none","fill","uniform","uniformToFill", the default"uniformToFill"
"backgroundImageStretchMode": "uniformToFill"// Background image position, accept"center","left","top","right","bottom","topLeft","topRight","bottomLeft","bottomRight", the default"center"
"backgroundImageAlignment": "center"Copy the code



Nostalgic style

It’s a retro style that mimics the effect of CRT monitors on big old computers, with scanlines and blurred text edges. This is an experimental feature and there is no guarantee that it will last.

// profiles 里的 defaults:
"experimental.retroTerminalEffect": true  Copy the code



Change color theme

There are several themes built into Windows Terminal, objects in Schemes that we can use directly, customize, or pick effects from iterm2colorschemes.com/ (science surf may be required). From github.com/mbadolato/i… Find the windowsterminal folder and copy it to Schemes

Example:

Lists: Lists: [{// Make changes here to the powershell.exe profile."guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}"."name": "Windows PowerShell"."commandline": "powershell.exe"// The theme in the default configuration"colorScheme": "Campbell"."hidden": false
  },
  {
      // Make changes here to the cmd.exe profile.
      "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}"."name": "Command prompt"."commandline": "cmd.exe"// Customize the theme"colorScheme": "3024 Day"."hidden": false
  },
  {
      "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}"."hidden": true."name": "Azure Cloud Shell"// Customize the theme"colorScheme": "3024 Night"."source": "Windows.Terminal.Azure"}]"schemes": [{"name": "3024 Day"."black": "# 090300"."red": "#db2d20"."green": "#01a252"."yellow": "#fded02"."blue": "#01a0e4"."purple": "#a16a94"."cyan": "#b5e4f4"."white": "#a5a2a2"."brightBlack": "#5c5855"."brightRed": "#e8bbd0"."brightGreen": "#3a3432"."brightYellow": "#4a4543"."brightBlue": "#807d7c"."brightPurple": "#d6d5d4"."brightCyan": "#cdab53"."brightWhite": "#f7f7f7"."background": "#f7f7f7"."foreground": "#4a4543"
  },
  {
      "name": "3024 Night"."black": "# 090300"."red": "#db2d20"."green": "#01a252"."yellow": "#fded02"."blue": "#01a0e4"."purple": "#a16a94"."cyan": "#b5e4f4"."white": "#a5a2a2"."brightBlack": "#5c5855"."brightRed": "#e8bbd0"."brightGreen": "#3a3432"."brightYellow": "#4a4543"."brightBlue": "#807d7c"."brightPurple": "#d6d5d4"."brightCyan": "#cdab53"."brightWhite": "#f7f7f7"."background": "# 090300"."foreground": "#a5a2a2"}]Copy the code

Frosted glass effect

If you miss the frosted glass effect of the Windows 7 era, take a look at the frosted glass theme configuration released by Microsoft:

Note: you need to remove all conflicting effects, such as dark themes, black backgrounds, background images, etc

{
  "theme": "light"."profiles": [{"name" : "PowerShell"."source" : "Windows.Terminal.PowershellCore"."acrylicOpacity": 0.7."colorScheme" : "Frost"."cursorColor" : "# 000000"."fontFace" : "Cascadia Code PL"."useAcrylic": true}]."schemes": [{"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"}}]Copy the code



Add Git Bash terminal

To open Git terminals in Windows Terminal, add Git Bash to your List configuration

You can also add SSH built-in clients and search for related content

"list"[{// guID needs to be unique, so I changed the last value slightly"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6102}"// Display the terminal name"name": "Git Bash"// Terminal address"commandline": "C:\\Program Files\\Git\\bin\\bash.exe"// Terminal icon"icon": "C:\\Program Files\\Git\\git.png"// Whether to hide"hidden": false}]Copy the code

Address: Git icon raw.githubusercontent.com/Jioho/img/m…



Add Windows Terminal to right-click menu

Having said all that, we’ll see that it’s inconvenient now to right-click in the target folder and not see the Windows Terminal option.

To add it to the right-click menu, you need to modify the Windows registry

1. Download the Windows Terminal icon and save it

Address: gitee.com/Jioho/img/r…

2, Create a new text file and paste this:

Note: the icon and program path should be replaced with the actual path of the local computer

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="open with Windows terminal"
"Icon"="C:\\Users\\ASUS\\AppData\\Local\\Terminal\\terminal.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command] @ ="C:\\Users\\ASUS\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"Copy the code

3. Save and exit the file, change the file suffix to.reg, and double-click the file

4. In the custom profile, profiles -> Defaults, add the following content and save it

"startingDirectory": ". /"Copy the code

5. Right-click on any folder to test

Other tips:

(1) Change the replication mode

Windows Terminal Select text, right-click anywhere to copy. If it has been copied, right-click it to paste.

With the following modification, you can automatically copy the text after selecting it:

{
  "copyOnSelect": true
}Copy the code

(2) Hide Azure Clund Shell

Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell Azure Clund Shell

(3) Customize Tab title

The Tab Tab displays the terminal name by default. You can customize the title

// In defaults or list of profiles:"tabTitle": "Jerry's terminal"Copy the code