Windows Terminal Preview

Windows_Terminal_Logo_256x256

I’ve started using the Windows Terminal preview and wish I had started sooner. Some of the functionality that is provides while simple is useful and gives a productivity boost. I’m bringing attention to the Windows Terminal because I find it so useful. The first question to answer is “What is it?”

From the name alone you might think that the Windows Terminal is yet another command line in the same ranks as the command prompt and PowerShell. This isn’t what it is. It is a new console host. The console host (c:\Windows\System32\conhost.exe)  may be something to which there’s not a lot of awareness, but it is a behind-the-scenes component that host console programs. When you start the command prompt it runs within the console host.

 

The Windows Terminal is an alternative console host. It is a program for managing various console environments in a single window with tabs.  Upon installation it is pre-configured for the Command Prompt, Powershell, and the Azure Cloud Shell. The availability of these items in a tabbed window alone is sufficient for me to find it useful. It isn’t limited to these programs though. The Windows Terminal is configurable to host other console programs through editing a JSON configuration file. There are some devices that I regularly connect to using SSH.  I’ve extended my configuration to have entries for these specific devices.  I had been previously using PUTTY for this but I find that with the Windows Terminal the process of opening a new tab into a device is easier.  The other connections are available in two clicks; one on a down-arrow on the tab, and another on the terminal to be opened.

WindowsTerminalOpenShell

Figuring out how to add items to the Windows Terminal is easy even without looking at the documentation. The Settings menu item in the drop down opens the configuration file in which you can see the entries for the PowerShell, Command Propmt, and Azure Cloud Shell.  If you wanted to add a new terminal you can copy one of the entries and makes changes.  There are a lot of other settings that haven’t been defined here. The fuller range of possible settings are published in Microsoft’s Github account.

https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md

A feature I find especially useful is the ability to set the a background image to the terminal The background image could be an animated GIF (I won’t do that, it is too distracting).  I have set the background images to something relevant to the terminal so that at a glance I can tell what terminal I’m looking at. For example, when I had a connection to one of my NVIDIA devices and a Raspberry Pi my windows look like the following.

terminals

I’ve made my images intentionally dark, but they can be within what ever color range is of your choosing. Color schemes for the text itself are also definable.  Custom images for icons and terminal backgrounds must be placed in one of two locations.

URI Scheme Location
ms-appdata:///Local/ %localappdata%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\
ms-appdata:///Roaming/ %localappdata%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\

For the entry for one of my Raspberry Pi’s I’ve got the following configuration using the Roaming URI scheme to refer to a background image.

{

    "guid": "{89CF3D23-06EA-4B1E-B42D-FC61239443ED}",
    "closeOnExit": true,
    "backgroundImage": "ms-appdata:///roaming/pi.png",
    "backgroundImageOpacity": 0.75,
    "backgroundImageStrechMode": "fill",
    "name": "SSH Raspberry Pi 3 (Sense Hat)",
    "commandline": "ssh 192.168.1.192 -l pi",
    "hidden": false
}

As with many keyboard driven interfaces there are hotkeys that you can press to perform actions. Some hotkeys are predefined, but you can define your own or change the predefined commands through the same JSON file in which the terminal entries exists.

In many programs pressing shift+enter will change a program to full screen model. I wanted to have the same behaviour in Windows Terminal and made an entry in the keybindings section for this.

{"command": "togleFullScreen", "keys": "shift+enter"}

The Windows Terminal also supports the full range of Unicode characters.  To take advantage of this the shell that you are using also needs to have support for it to. Many already do but had no way of properly displaying the characters.

unicode

The Windows Terminal is available in the Microsoft Store for free or from Github.

twitterLogofacebookLogo youtubeLogo

 


 
 
Windows Powershell Cookbook



Going Text:Mastering the Power of the Command Line

One thought on “Windows Terminal Preview

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.