hazardous

customizing the new microsoft Terminal

Windows Terminal


i know this is filed under 'linux' and somewhat contradictory, but it's 2020 and whatever deal Gates made with the devil has allowed the world of cross-compatibility between windows and linux to finally resemble the dream many folks, myself included, have always had: almost complete interoperability.

on windows, the new WSL platform has completely transformed how new users can approach linux - for me, something as little as being able to pull up a linux shell at will, without having to re/dual-boot, led to an exponential increase in learning to use linux: after a decade of being a regular Ubuntu user, with little to show, it took two years of WSL to go from sudo apt install being all of what i knew about using the command line, to regularly uploading new (albeit simple and small) linux programs to my github.

likewise, on Linux, i am able to enjoy running some of my favorite windows programs using WINE - including older programs that, lol, don't even work on Windows 10.

the final piece of the puzzle


WSL has dramatically improved, possibly at a rate faster than windows itself1 - in my own experience it seems every 'how-to' i googled was outdated by the time i stumbled across them.

the one, major limitation of WSL seemed to be the fact that Windows' own terminal emulator always seemed to be severely lacking in almost every category. Powershell is an improvement on many fronts, but still, once you've used any terminal program on a Linux-based OS, you'll never enjoy having to use the command-line on a Microsoft product. or at least... until now.

over the past few years i discovered and fell in love with a user-made solution, wsltty. it solves almost every problem plaguing the classic cmd.exe prompt - and dare i say it, it even had advantages which had me wishing certain linux terminal programs would implement...

seeking to rectify this, Microsoft announced a new Terminal a year or so ago. soon enough they rolled out a beta application, and it was... well, it was promising, but I still had issues that prevented it from becoming a replacement for wsltty.

but the team behind it kept at it, and it improved quickly. and as of a month ago, during a regular wipe/reformat/reinstall of Windows, i made the leap - and installed Windows Terminal as my main terminal, instead of wsltty.

using Windows Terminal


microsoft terminal

out of the box, the experience with Terminal is pretty satisfactory, and it takes alot of cues from a very awesome terminal, Terminus. however, i've done some tweaking for my preferences, some of which are key:

some highlights


by default, Terminal runs as a 'tabbed window'. personally i enjoy a plain-jane, no-frills window - no scrollbar and no fluff. since i do not use Terminal for multiple environments (ie cmd, powershell, etc) not having any sort of menu at the top doesn't really affect me.

  {
        "alwaysShowTabs": false,
    "showTabsInTitlebar": false,
    "showTerminalTitleInTitlebar": true,
  }

this is how I have my terminal setup - with my WSL environment set as default, these are the options I use to further tweak the WSL profile. it's pretty cool that you can define unique settings depending on your environment - ie if you open up a PowerShell command prompt, it will by default resemble the classic PowerShell we all know and love, with that blue background etc.

"profiles":
{
    "defaults":
    {
        // Put settings here that you want to apply to all profiles.
    },
    "list":
    [
        {
            "guid": "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}",
            "hidden": false,
            "name": "WLinux",
            "source": "Windows.Terminal.Wsl",
            "colorScheme": "Snazzy",
            "fontFace": "ProggyTinyTTSZ NF",
            "antialiasingMode": "antialiased",
            "startingDirectory": "//wsl$/WLinux/home/jerome",
            "fontSize": 10,
            "useAcrylic": true,
            "acrylicOpacity": 0.8,
            "scrollbarState": "hidden",
            "padding": "1, 1, 1, 1",
            // "experimental.retroTerminalEffect": true
            "cursorShape": "filledBox"
        },
},

as you can see, i have defined the theme as Snazzy, which is not a theme that ships by default. i created a new color scheme and cribbed the hex codes from - you guessed it - Snazzy. however, i did fiddle a bit with some colors - borrowing in particular the fantastic shade of yellow used by Ayu. #ffcc66.

{
  "schemes": [
    {
          "name": "Snazzy",
          "cursorColor" : "#ffcc66",
          "black": "#000000",
          "red": "#fc4346",
          "green": "#50fb7c",
          "yellow": "#f0fb8c",
          "blue": "#49baff",
          "purple": "#fc4cb4",
          "cyan": "#8be9fe",
          "white": "#ededec",
          "brightBlack": "#555555",
          "brightRed": "#fc4346",
          "brightGreen": "#50fb7c",
          "brightYellow": "#f0fb8c",
          "brightBlue": "#49baff",
          "brightPurple": "#fc4cb4",
          "brightCyan": "#8be9fe",
          "brightWhite": "#ededec",
          "background": "#1e1f29",
          "foreground": "#ebece6"      
    }
  ]
}

thoughts


all in all - freed from the obligation to maintain legacy compatibility with cmd.exe all the way back to the 90's-era Windows systems, the devs behind MS Terminal have been able to release an incredibly functional terminal for Windows, one any Linux user wouldn't miss much when using. it handles keys and characters like a sane terminal emulator should, it looks great, it can be tweaked and comes with a huge amount of configurability that this post barely scratches the surface of.

the one thing i'm still somewhat miffed by is how these settings are changed - you must open a settings.json file, and enter in the settings as depicted above, in the yaml/json formatting. since the file by default is saved in the murky depths of the user's AppData folder, it can be hard to actually locate the file if you have disabled the menubar (as I have). although you still have to edit the config manually, the menu options provide a quick shortcut to open the settings.json file in a text editor, making locating it a non-issue. since i have disabled this, my current solution is to keep the file open in VSCode - or make sure it never slips out of the 'Recent' file list.

this is something of an issue, but since i have now been using this program for some time, my settings no longer require much playing around with once the initial setup is done, and i copy over my backed-up settings file into the one generated upon a new installation of the program.

but that is pretty much it - otherwise this terminal feels like any other modernish Linux terminal like gnome-term or konsole, with a similar reliability and flexibility to boot. not bad, microsoft.. not bad!


  1. turns out this might not have been a far-out speculation

  2. e.g. if you enter Yourfont, it might not be able to find it. instead, try variations like Yourfont Mono, Your Font Mono etc - it helps to dig into your font file's metadata to see what some different titlenames may be.