NickyMeulemanNime
Metadata
  • Date

  • Last update

  • By

    • Nicky Meuleman
  • Tagged

    • Howto
    • DX
  • Older post

    WSL2, zsh, and docker. Linux through Windows.

  • Newer post

    How to unfork a repo on GitHub

Table of contents
  1. Installation
  2. Features
  3. Configuration
    1. Defaults
    2. Flexibility

The Windows Terminal

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.

Installation

The Windows Terminal is available on the Windows Store.

store listing

The Terminal can also be manually installed via the GitHub releases page or via the Windows Package Manager (winget).

winget install --id=Microsoft.WindowsTerminal -e

Features

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.

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.

e.g: keybindings like copy&paste, panes like tmux, …

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 settings.json file.

While not as fancy as 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.

Defaults

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 settings.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 setting the value of defaultProfile to the same GUID.

settings.json
{
// ...
"defaultProfile": "the GUID of your chosen profile",
// ...
"profiles": {
// ...
"list": [
{
// ...
"guid": "a GUID string"
// ...
}
// more profiles
]
}
}

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

settings.json
{
// in a profile-object
"startingDirectory": "//wsl$/Ubuntu/home/nicky"
}

Flexibility

After some more tweaking, I think my terminal looks pretty sweet.
I saved my settings.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

Designed and developed by Nicky Meuleman

Built with Gatsby. Hosted on Netlify.