Windows Terminal Preview 1.21 Release

Windows Terminal is back with another preview release! Windows Terminal Preview 1.21 introduces long-awaited features like Buffer Restore and fontfall back as well as new experimental features like Scratchpad and the ability to load up an image as a texture. There’s also a LOT MORE stuff so check out the rest of this blog post to learn more!

We are also updating Windows Terminal stable to version 1.20 which will include all of the features from this previous blog post. You can install Windows Terminal and Windows Terminal Preview from the Microsoft Store, from the GitHub releases page, or by using winget.

If you are interested in our bleeding edge features, you can also download Windows Terminal Canary from our GitHub repo.

Now let’s learn more about Windows Terminal Preview 1.21!

Buffer Restore​


Windows Terminal can now remember the contents of the screen and restore them on startup. To enable this, you will have to select “Open windows from a previous session” in your Startup settings.

Startup.png

Buffer snapshots are stored in Virtual Terminal-encoded text within your package’s local state directory. This directory is typically secured to your user account. Please be aware of these implications if you plan to enable this feature while using a portable distribution of Windows Terminal.

BufferRestore.gif

Font Fallback​


The font face setting in your profiles’s appearance settings now support multiple fonts and you can use commas to list them out. Glyphs which are not found in your first font will be sought in all later fonts.

Below is an example of my PowerShell profile’s font face setting supporting Cascadia Mono NF and MS Gothic:

FontFallback-1.png

New Font Settings​


Speaking of fonts, we have added new settings to allow you to customize the OpenType Features and Axes of your font stack. We have also added settings to allow you to toggle whether you want to use built-in glyphs or full-color emojis (this one is my personal favorite 1f609.png)

NewFontSettings.png

Here is what emojis look like with the full-color emoji setting turned off:

No-Color-Emojis.png

New Advanced Settings in the Settings UI​


Speaking of settings, we have also added four new settings to the Settings UI in your profiles’s advanced settings. These are settings that enable the right-click context menu, display scrollbar marks (which are now pretty stable!), automatically mark prompts, and allow you to reposition the cursor with mouse clicks (experimental.)

NewAdvancedSettings.png

In the past, these settings could have only been adjusted via the settings.json file but now they can also be adjusted in the Settings UI 1f642.png

Rendering Updates​


If you look at the Rendering settings of Windows Terminal Preview, you might notice a few changes. Now that AtlasEngine is the default text rendering engine for Windows Terminal, we have removed the old DxEngine from Windows Terminal.

We have also added some new settings to let you control the behavior of the AtlasEngine via a setting that allows you to select the Graphics API and a setting to disable partial Swap Chain invalidation.

RenderingSettings.png

Added Support for Custom Box Drawing and Powerline Glyphs​


With the AtlasEngine, Windows Terminal can now render pixel-perfect block elements, box-drawing characters, PowerLine symbols, and high-fidelity textured shade glyphs.

This is enabled by default but you can turn it off by disabling “Built-in Glyphs” in the Settings UI (or by going to your settings.json file and setting {profile}.font.builtinGlyphs to false)

block_glyphs.png

IME Integration​


We have rewritten our Input Method Editor (IME) integration from the ground up. This new rewrite properly blends into TUI applications by adopting their foreground and background colors. We also now use double underlines, wavy lines, and dashed lines to convey more information than ever before in more languages. Oh, and you can finally move the clause cursor during a composition 1f642.png

The image below is an example of our IME integration in action:

ime_composite.png

Here is an example of our IME integration blending into a TUI application like FAR Manager:

far_composition.png

Custom Actions in Fragment Extensions​


Our JSON Fragment Extensions now support Custom Actions. Here is an example of a Custom Action that you can call.

Code:
{
  "schemes": [
    {
      "name": "Dracula",
      "black": "#000000",
      "red": "#ff5555",
      "green": "#50fa7b",
      "yellow": "#f1fa8c",
      "blue": "#bd93f9",
      "purple": "#ff79c6",
      "cyan": "#8be9fd",
      "white": "#bbbbbb",
      "brightBlack": "#555555",
      "brightRed": "#ff5555",
      "brightGreen": "#50fa7b",
      "brightYellow": "#f1fa8c",
      "brightBlue": "#bd93f9",
      "brightPurple": "#ff79c6",
      "brightCyan": "#8be9fd",
      "brightWhite": "#ffffff",
      "background": "#1e1f29",
      "foreground": "#f8f8f2",
      "selectionBackground": "#44475a",
      "cursorColor": "#bbbbbb"
    }
  ],
  "actions": [
    {
      "command": {
        "action": "setColorScheme",
        "colorScheme": "Dracula"
      },
      "name": "Phone up Bram Stoker",
      "id": "Dracula.Draculize"
    }
  ]
}

If you place the snippet as a .json file inside a Fragments folder in %LOCALAPPDATA%\Microsoft\Windows Terminal, then you’ll be able to call a custom action called “Phone Up Bram Stoker” that sets your Color Scheme to the Dracula color scheme.

Shoutout to @DHowett for this example and draculatheme.com for the colorful theme 1f9db.png

Custom-Action-in-Fragment-Extensions.gif

Scratchpad (Experimental)​


We have refactored terminal panes to be able to host non-Terminal content. One application of this refactor is our new, experimental Scratchpad feature. This feature open up a textbox in a separate terminal pane. To enable Scratchpad, add the following as an action in your settings.json file:

Code:
{"action":"splitPane","type":"scratchpad"}

After that Action is saved, you can invoke it in your Command Palette (as with every Action you make.) You can also assign a keybinding to that action as well if you do not want to open the Command Palette every time you want to use this Action.

Scratchpad.gif

experimental.pixelShaderImagePath Setting​


Users can now load up an image as a texture by using the experimental.pixelShaderImagePath setting. Huge shoutout to @mrange for this contribution and example!

In @mrange‘s example below, you can see that the pixelShaderImagePath points to a PNG loaded as a texture which the shader pointed out by pixelShaderPath uses.

Code:
"defaults": 
 { 
     "experimental.pixelShaderImagePath": "C:\temp\cake.png", 
     "experimental.pixelShaderPath": "C:\code\github\windows-terminal-shaders\cake.hlsl" 
 },

@mrange‘s final result looks like this:

mrangeExampleOfPixelShaders.png

Usability Updates​


26a1.png Terminal distributions now come with an additional library, Microsoft.Terminal.UI.dll. Its .winmd is not required.

26a1.png Marks are no longer an experimental feature! They also now reflow on resize and clear properly!

26a1.png The Pane keybindings Alt+Shift++ and Alt+Shift+- will now duplicate your active profile.

26a1.png Terminal will now delete its in-box color schemes from your local settings file, unless you’ve modified them.

26a1.png You can no longer edit the color schemes that come with Terminal without copying them.

26a1.png We’ve added new color schemes: Dark+, CGA and IBM!

26a1.png Profiles now default to the icons of their .exe files, if those can be determined. If you want your profile to have no icon, you must set the icon to "none" (or check the “Hide icon” in Settings)

26a1.png The Search box now animates in and out (thanks @tusharsnx!)

26a1.png We’ve restyled the Warning and Error displays around the font settings so that they’re more readable.

26a1.png We’ve started laying the groundwork for action binding so please be on the lookout for any strangeness!

Bug Fixes​


1f41b.png Double-clicking a word on the left side of the screen will no longer select parts of your right prompt.

1f41b.png URLs that touch the right side of the screen or get resized are once again clickable

1f41b.png Double-clicking a word in a double-width or double-height row now actually selects the right word (thanks again @tusharsnx!)

1f41b.png During RTF export, we will now use a background color directive that Microsoft Word understands (#16035) (thanks yet again @tusharsnx!)

1f41b.png Our light color schemes no longer have a truly unusable selection highlight color (thanks @uoRetr0!)

1f41b.png We’ve fixed an issue where hyperlinks are detected in the wrong place if there’s a wide character (thanks @comzyh!)

1f41b.png You can no longer use the Settings UI to enter an initial size that is out of bounds (thanks @chingucoding!)

1f41b.png The experimental repositionCursorWithMouse setting now actually works after you’ve scrolled the screen.

1f41b.png doskey macros finally works on inputs with more than one consecutive space character.

1f41b.png AtlasEngine will no longer occasionally crash when rendering characters in the Unicode Private Use Area.

Virtual Terminal Compatibility Improvements​


Huge thanks to @j4james for his help in the Virtual Terminal space!

1f5a5.png You can now set the window (tab, pane) title with DECSWT (Set Window Title) in addition to XTerm’s OSC 2

1f5a5.png We now support DECAUPSS, DECRQUPSS and ACS, which completes the 8-bit interface architecture.

1f5a5.png DCS sequences that span packets will no longer get sliced in half and–in so being–destroyed.

Performance Improvements​


1f525.png Search highlighting was rewritten to be more robust, responsive, and performant (thanks again @tusharsnx!)

1f525.png The console hosting backend no longer spuriously repaints single characters (thanks yet again @j4james!)

1f525.png Moving the cursor around was surprisingly expensive so we reduced the cost of cursor invalidation!

Windows Terminal 1.21 Preview is packed with lots of updates. For a full list of changes and which versions of Windows Terminal those changes were backported to, please visit our a> page on the Windows Terminal GitHub repository for more information.

Top contributors​


We love working with the community and recognizing those who made an impact for each release. Here are the community members who helped out for this one!

Contributors who created the most merged pull requests​


1f3c6.png Jvr2022

1f3c6.png tusharsnx

1f3c6.png j4james

Contributors who opened the most non-duplicate issues​


1f3c6.png j4james

1f3c6.png Zeroes1

1f3c6.png PhMajerus

Contributors who provided the most comments on pull requests​


1f3c6.png tusharsnx

1f3c6.png j4james

1f3c6.png FuegoFro

We would also like to give a special thanks to @hellocharli, @Blake-Madden, @wcruz-br, and @berlintay, for code quality, documentation, repository management, and dependency updates across the board!

Thank you!​


We hope you enjoy this release of Windows Terminal 1.21 Preview! More information on these new features can be found on our docs site and if you find any bugs or have feature requests, feel free to file them on GitHub.

If you have any questions you can reach out to Christopher Nguyen (@nguyen_dows) on X (formerly Twitter.)

Thanks again!

Jan2023Signatures.png

The post Windows Terminal Preview 1.21 Release appeared first on Windows Command Line.

Continue reading...
 

Similar threads

C
Replies
0
Views
45
Christopher Nguyen
C
C
Replies
0
Views
94
Christopher Nguyen
C
C
Replies
0
Views
268
Christopher Nguyen
C
K
Replies
0
Views
35
Kayla Cinnamon
K
Back
Top Bottom