DEV Community

Cover image for The new Windows Terminal
Nicky Meuleman
Nicky Meuleman

Posted on • Originally published at nickymeuleman.netlify.com on

The new Windows Terminal

Updated 06 december 2019

Microsoft is working on a new command line application called Windows Terminal.

The promo video looks very promising, let's hope it lives up to expectations.

A preview version of the Windows Terminal is available on the Windows Store.

store listing

The old, well known, often despised, cmd application is not very feature rich. Its main goal is to remain backwards compatible, preventing many features from being added.

The new Windows Terminal, however, has a lot of bells and whistles.

It's a central location to access many different shells like the good 'ol cmd, PowerShell, your fancy WSL shell, ...

The project is open-source, take a look at the, mainly C++ repository.

From their README.md:

Windows Terminal is a new, modern, feature-rich, productive terminal application for command-line users. It includes many of the features most frequently requested by the Windows command-line community including support for tabs, rich text, globalization, configurability, theming & styling, and more.

The Terminal will also need to meet our goals and measures to ensure it remains fast, and efficient, and doesn't consume vast amounts of memory or power.

Many additional features are coming.

f.e: keybinding like copy&paste, panes like tmux, ...

These features are now (6 december 2019) available.
For a full(ler) look at what they have planned and should be there for the 1.0 release, have a gander at the milestones.

Even more features are on the developers' nice-to-have list and may be coming.

Like a dev that thinks supporting themes with .itermscolors files would be cool.

Will that become a reality? No idea.

Would it be cool? Absolutely! 🤩

Configuration

There are many configuration options to make the overall application, and each shell, act/look like you want.
This happens in a profiles.json file.

While not as fancy as using a GUI, it is quite an enjoyable method.

Especially if that file has a JSON-schema attached to it.

I hope they add one soon, because JSON-schemas are awesome.

Edit: They did 🎉! It was added in version 1909. This brings me great joy.

When you first install the application, it will present you with a PowerShell window.

default PowerShell

Having recently put in some time to get the Windows subsystem for Linux 2 up and running, I want it to show that instead when I launch the terminal.

Luckily, the Ubuntu terminal from WSL2 was already in the list of available shells.

shell list clicking the dropdown

Open the profiles.json file by clicking settings option in the dropdown, or by hitting the ctrl+, shortcut.

Changing it to be the default shell meant finding the GUID of that Ubuntu profile under the profiles key and placing that in the defaultProfile under globals.

// profiles.json
{
  "globals": {
    // ...
    "defaultProfile": "the GUID of your chosen profile"
    // ...
  },
  "profiles": [
    {
      // ...
      "GUID": "a GUID string"
      // ...
    }
    // more profiles
  ]
}
Enter fullscreen mode Exit fullscreen mode

By default, that shell opens in your user-directory on Windows.
My projects are located on the Linux side, so I want the shell to open in my Ubuntu home directory.

// in a profile-object
{
  "startingDirectory": "//wsl$/Ubuntu/home/nicky"
}
Enter fullscreen mode Exit fullscreen mode

After some more tweaking, I think my terminal looks pretty sweet.

I saved my profiles.json to a public gist.

Windows Terminal

A developer named Chris Duck made a PowerShell module to control this: MSTerminalSettings.

Remember the dev that thought using iTerm color scheme files would be neat? Yeah, this module makes that possible. 🤯

Chris lists using schemes from iterm2colorschemes.com as an example of what his module can do.

Scott Hanselman and Tyler Leonhardt immediately used it for the best of reasons, shenanigans.

They made Terminal Attract Mode. The self proclaimed "greatest PowerShell script ever written, today" places animated gifs as the background of your terminal. It's glorious. 🤣

terminal attract mode

Top comments (3)

Collapse
 
albarriere profile image
Antoine Barrière

I need to change of laptop soon. Here I have finally a reason to give it a try to window again ;)

Collapse
 
willvincent profile image
Will Vincent

Windows 10, after some config to turn off some of the default yuck (those damned tiles in the start menu, puke), with the linux subsystem, and a quality terminal is kind of refreshingly non awful :)

I'm using the cmder.net terminal myself, tabbed, ability to launch regular cmd, powershell, or the WSL.. I have mine set to launch WSL by default, which in turn is setup to use ZSH :D

Collapse
 
fennecdjay profile image
Jérémie Astor

They made Terminal Attract Mode.

Looks more like Terminal Distract Mode to me 😄