== 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 [[ https://docs.microsoft.com/en-us/windows/terminal/ | the Windows Terminal app ]], probably by going to https://aka.ms/terminal to get it from the Windows Store.
=== Set it up! ===
You'll also want to install a good text editor like [[ https://kate-editor.org/get-it/ | Kate ]], or just get [[ documentation/windows/wsl/ ]] 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!
Also, all these settings can be [[ https://docs.microsoft.com/en-us/windows/terminal/custom-terminal-gallery/custom-schemes | 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.
==== Keybindings ====
Keybindings are [[ https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions | 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.
```
lang=json
// 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 [[ https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings#enable-acrylic | Microsoft's official documentation notes ]],
First, you can [[ https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings#acrylic-settings | use "Acrylic" ]]. which looks kinda nice but 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!> The transparency only applies to focused windows due to OS limitations.
```
lang=json
"useAcrylic": true,
"acrylicOpacity": 0.4
```Ah, once again the software developers at Microsoft are thwarted by the limitations of this OS developed by //*checks notes*// Microsoft.
Better, though,Nonetheless you can [[ https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings#acrylic-settings | use "Acrylic" ]]. to just [[ https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-settings#background-image-settings | use a background image and set the opacity that way ]],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. sincBut maybe you want this because it avoids this "platform-level limitation".looks so nice and layers of transparent windows atop eachother can be visually chaotic!
```
lang=json
// Using forward slashes because otherwise we get "Bad escape sequence in string", Microsoft again at war with themselves, I kindof love it
"backgroundImage": "C:/Users/philu/OneDrive/Pictures/Wallpapers/FS-7811_24.jpg",
"backgroundImageAlignment": "bottomRight",
"backgroundImageStretchMode": "none""useAcrylic": true,
"backgroundImage"acrylicOpacity": 0.4
```
Except that doesn't work,Is there no way to fix this [[ https://github.com/microsoft/terminal/issues/2326#issuecomment-529135239 | obviously broken behaviour ]]? Doesn't look like it; for some reason :( Is there no way to fix this [[ https://github.com/microsoft/terminal/issues/2326#issuecomment-529135239 | obviously broken behaviour ]]?[[ https://github.com/microsoft/terminal/issues/5145 | maybe one day ]], Doebut for "performance reasons" it isn't look like it;allowed with the official Microsoft widgets. [[ https://github.com/microsoft/terminal/issues/5145 | maybe one day ]].
In the meantime if you want fun transparency you need [[ https://fediverse.keithzg.ca/notice/9zrpRKl3ZT282vBfYe | a heftier computer ]].