Guest Christopher Nguyen Posted May 28 Posted May 28 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! [HEADING=1]Buffer Restore[/HEADING] 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. 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. [HEADING=1]Font Fallback[/HEADING] 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: [HEADING=1]New Font Settings[/HEADING] 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 ) Here is what emojis look like with the full-color emoji setting turned off: [HEADING=1]New Advanced Settings in the Settings UI[/HEADING] 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.) In the past, these settings could have only been adjusted via the [iCODE]settings.json[/iCODE] file but now they can also be adjusted in the Settings UI [HEADING=1]Rendering Updates[/HEADING] 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. [HEADING=2]Added Support for Custom Box Drawing and Powerline Glyphs[/HEADING] 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 [iCODE]settings.json[/iCODE] file and setting {profile}.font.builtinGlyphs to [iCODE]false[/iCODE]) [HEADING=2]IME Integration[/HEADING] 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 The image below is an example of our IME integration in action: Here is an example of our IME integration blending into a TUI application like FAR Manager: [HEADING=1]Custom Actions in Fragment Extensions[/HEADING] Our JSON Fragment Extensions now support Custom Actions. Here is an example of a Custom Action that you can call. { "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 [iCODE].json[/iCODE] file inside a [iCODE]Fragments[/iCODE] folder in [iCODE]%LOCALAPPDATA%\Microsoft\Windows Terminal[/iCODE], 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 [HEADING=1]Scratchpad (Experimental)[/HEADING] 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 [iCODE]action[/iCODE] in your [iCODE]settings.json[/iCODE] file: {"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. [HEADING=1]experimental.pixelShaderImagePath Setting[/HEADING] Users can now load up an image as a texture by using the [iCODE]experimental.pixelShaderImagePath[/iCODE] setting. Huge shoutout to @mrange for this contribution and example! In @mrange‘s example below, you can see that the [iCODE]pixelShaderImagePath[/iCODE] points to a PNG loaded as a texture which the shader pointed out by [iCODE]pixelShaderPath[/iCODE] uses. "defaults": { "experimental.pixelShaderImagePath": "C:\temp\cake.png", "experimental.pixelShaderPath": "C:\code\github\windows-terminal-shaders\cake.hlsl" }, @mrange‘s final result looks like this: [HEADING=1]Usability Updates[/HEADING] Terminal distributions now come with an additional library, [iCODE]Microsoft.Terminal.UI.dll[/iCODE]. Its [iCODE].winmd[/iCODE] is not required. Marks are no longer an experimental feature! They also now reflow on resize and clear properly! The Pane keybindings Alt+Shift++ and Alt+Shift+- will now duplicate your active profile. Terminal will now delete its in-box color schemes from your local settings file, unless you’ve modified them. You can no longer edit the color schemes that come with Terminal without copying them. We’ve added new color schemes: Dark+, CGA and IBM! Profiles now default to the icons of their [iCODE].exe[/iCODE] files, if those can be determined. If you want your profile to have no icon, you must set the icon to [iCODE]"none"[/iCODE] (or check the “Hide icon” in Settings) The Search box now animates in and out (thanks @tusharsnx!) We’ve restyled the Warning and Error displays around the font settings so that they’re more readable. We’ve started laying the groundwork for action binding so please be on the lookout for any strangeness! [HEADING=1]Bug Fixes[/HEADING] Double-clicking a word on the left side of the screen will no longer select parts of your right prompt. URLs that touch the right side of the screen or get resized are once again clickable Double-clicking a word in a double-width or double-height row now actually selects the right word (thanks again @tusharsnx!) During RTF export, we will now use a background color directive that Microsoft Word understands (#16035) (thanks yet again @tusharsnx!) Our light color schemes no longer have a truly unusable selection highlight color (thanks @uoRetr0!) We’ve fixed an issue where hyperlinks are detected in the wrong place if there’s a wide character (thanks @comzyh!) You can no longer use the Settings UI to enter an initial size that is out of bounds (thanks @chingucoding!) The experimental [iCODE]repositionCursorWithMouse[/iCODE] setting now actually works after you’ve scrolled the screen. [iCODE]doskey[/iCODE] macros finally works on inputs with more than one consecutive space character. AtlasEngine will no longer occasionally crash when rendering characters in the Unicode Private Use Area. [HEADING=1]Virtual Terminal Compatibility Improvements[/HEADING] Huge thanks to @j4james for his help in the Virtual Terminal space! You can now set the window (tab, pane) title with [iCODE]DECSWT[/iCODE] (Set Window Title) in addition to XTerm’s OSC 2 We now support [iCODE]DECAUPSS[/iCODE], [iCODE]DECRQUPSS[/iCODE] and [iCODE]ACS[/iCODE], which completes the 8-bit interface architecture. DCS sequences that span packets will no longer get sliced in half and–in so being–destroyed. [HEADING=1]Performance Improvements[/HEADING] Search highlighting was rewritten to be more robust, responsive, and performant (thanks again @tusharsnx!) The console hosting backend no longer spuriously repaints single characters (thanks yet again @j4james!) 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. [HEADING=1]Top contributors[/HEADING] 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! [HEADING=2]Contributors who created the most merged pull requests[/HEADING] Jvr2022 tusharsnx j4james [HEADING=2]Contributors who opened the most non-duplicate issues[/HEADING] j4james Zeroes1 PhMajerus [HEADING=2]Contributors who provided the most comments on pull requests[/HEADING] tusharsnx j4james 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! [HEADING=1]Thank you![/HEADING] 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! The post Windows Terminal Preview 1.21 Release appeared first on Windows Command Line. Continue reading... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.