Page MenuHomePhorge

Windows Terminal app
Updated 874 Days AgoPublic

Preamble

So, you're stuck on Windows for some reason while using a terminal. I feel for you! I'm sometimes there myself, when I'm over in game-playing mode for some tricky DRM'd nonsense and want to pop open a terminal for some reason or another. In those cases, it's nice to have a good environment. That used to be basically impossible on Windows. It still is of course, but markedly less so!

Windows Terminal app

Get it!

First thing you'll want to do is grab the Windows Terminal app, probably by going to https://aka.ms/terminal to get it from the Windows Store.

If installing manually, ex. by downloading releases from the GitHub page, you may need to install the VC 14 desktop bridge framework or whatever (which is very funny, once again Windows just doesn't support any Microsoft development chains out of the box). Install the files with Add-AppxPackage in PowerShell.

Set it up!

You'll also want to install a good text editor like Kate, or just get Windows Subsystem for Linux installed quickly so you can use Vim or Nano or such. You'll be ending up editing %LOCALAPPDATA%/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json a lot and it's nice to have syntax highlighting when fiddling with JSON (although it also highlights how Microsoft is mis-using JSON by including comments; not gonna lie, I'm kindof on Microsoft's side on this one).

Big gotchas if you're not familiar with JSON include, but are not limited to:

  • Hugely picky about commas (which is particularly surprising seeing as JSON spawned from JavaScript). Lists cannot end with commas, so if you're adding a new item to the end of a list, you'll need to remember to add a comma to the previously-last item in the list otherwise everything will fail. Oh yeah and essentially everything is a list. Have fun!

Note that Microsoft's parser actually seems pretty forgiving; don't let that lull you into a false sense of security, however, writing the same JSON elsewhere will likely fail.

Also, note that theme settings can be schemes, and that's what the official documentation really wants you to do, but:

  • It's perhaps more fun, and quicker, just to edit the existing profiles though.
    • And each default profile is automatically re-inserted if removed, so they're gonna be there anyways (no matter how useless the damn Azure Cloud Shell is), although you can of course flip them to "hidden": true.
  • It seems many options don't work if part of color schemes, but all options work as part of the profile, so if you're not looking to re-use colors on multiple profiles then it's easier just to put all the options under the profile.
Keybindings

Keybindings are defined in the "actions" section as of version 1.4. Here are some sane, common keybindings. Many of the existing ones aren't too bad.

// using keybindings rather than actions because as of this writing the latest Windows Store version is still 1.3
"keybindings": [
        { "command": "scrollUpPage", "keys": "shift+pgup" },
        { "command": "scrollDownPage", "keys": "shift+pgdn" },
        { "command": "toggleRetroEffect", "keys": "ctrl+shift+t" }
    ]
Transparency

There is currently only one way to set transparency, and it's entirely broken if you're used to any real Terminal app elsewhere. As Microsoft's official documentation notes,

The transparency only applies to focused windows due to OS limitations.

Ah, once again the software developers at Microsoft are thwarted by the limitations of this OS developed by *checks notes* Microsoft.

Nonetheless you can use "Acrylic". which looks kinda nice but yeah thanks to baffling design decisions elsewhere in Microsoft that the developers of the Terminal app seem to be dissing in the official docs, it doesn't work when the window isn't in focus. But maybe you want this because it looks so nice and layers of transparent windows atop eachother can be visually chaotic!

"useAcrylic": true,
"acrylicOpacity": 0.4

Is there no way to fix this obviously broken behaviour? Doesn't look like it; maybe one day, but for "performance reasons" it isn't allowed with the official Microsoft widgets. In the meantime if you want fun transparency you need a heftier computer.

Last Author
keithzg
Last Edited
Apr 25 2022, 8:32 PM