diff --git a/TerminalDocs/customize-settings/actions.md b/TerminalDocs/customize-settings/actions.md index 5ff36024..506455cf 100644 --- a/TerminalDocs/customize-settings/actions.md +++ b/TerminalDocs/customize-settings/actions.md @@ -286,10 +286,16 @@ ___ ### Close tab -This closes the current tab. +This closes the tab at a given index. If no index is provided, use the focused tab's index. **Command name:** `closeTab` +#### Actions + +| Name | Necessity | Accepts | Description | +| ---- | --------- | ------- | ----------- | +| `index` | Optional | Integer | Position of the tab to close. | + ### Close all other tabs This closes all tabs except for the one at an index. If no index is provided, use the focused tab's index. @@ -688,6 +694,23 @@ _This command is not currently bound in the default settings_. > [!IMPORTANT] > This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). +### Minimize To Tray ([Preview](https://aka.ms/terminal-preview)) + +This will hide the currently focused window from the Taskbar and instead will be accessible from the system tray icon. This action will only be useable when the tray icon is visible through one of the two global settings `minimizeToTray` or `alwaysShowTrayIcon`. + +**Command name:** `minimizeToTray` + +**Default binding:** + +_This command is not currently bound in the default settings_. + +```json +{"command": "minimizeToTray" }, +``` + +> [!IMPORTANT] +> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). +
___ @@ -1125,7 +1148,17 @@ The `desktop` and `monitor` properties can be combined in the following ways: This action is a special variation of the [`globalSummon`](#global-commands) action. It specifically summons the [quake window](../tips-and-tricks.md#quake-mode). It is a shorthand for the following `globalSummon` action: ```json -{ "keys": "win+`", "command": { "action": "globalSummon", "name": "_quake", "dropdownDuration": 200, "toggleVisibility": true, "monitor": "toCursor", "desktop": "toCurrent" } } +{ + "keys": "win+`", + "command": { + "action": "globalSummon", + "name": "_quake", + "dropdownDuration": 200, + "toggleVisibility": true, + "monitor": "toMouse", + "desktop": "toCurrent" + } +} ``` If you'd like to change the behavior of the `quakeMode` action, we recommended creating a new `globalSummon` entry in `actions` with the settings you prefer. diff --git a/TerminalDocs/customize-settings/interaction.md b/TerminalDocs/customize-settings/interaction.md index f77aeab8..73fbcf0a 100644 --- a/TerminalDocs/customize-settings/interaction.md +++ b/TerminalDocs/customize-settings/interaction.md @@ -108,6 +108,44 @@ When this is set to `true`, the window will snap to the nearest character bounda ___ +## Minimize To Tray ([Preview](https://aka.ms/terminal-preview)) + +When this is set to `true`, minimizing a window will hide it from the taskbar, making it inaccessible from that area. It will instead be accessible from Terminal's system tray icon. If either this global setting or the `minimizeToTray` global setting is set to true, Terminal will place an icon in the system tray. The user will also be able to utilize the `minimizeToTray` _action_. + +**Property name:** `minimizeToTray` + +**Necessity:** Optional + +**Accepts:** `true`, `false` + +**Default value:** `false` + +> [!IMPORTANT] +> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). + +
+ +___ + +## Always Show Tray Icon ([Preview](https://aka.ms/terminal-preview)) + +When this is set to `true`, the Terminal will place its icon in the system tray. If either this global setting or the `minimizeToTray` global setting is set to true, Terminal will place an icon in the system tray. The user will also be able to utilize the `minimizeToTray` _action_. + +**Property name:** `alwaysShowTrayIcon` + +**Necessity:** Optional + +**Accepts:** `true`, `false` + +**Default value:** `false` + +> [!IMPORTANT] +> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). + +
+ +___ + ## Tab settings ### Tab switcher interface style diff --git a/TerminalDocs/customize-settings/profile-appearance.md b/TerminalDocs/customize-settings/profile-appearance.md index e4ef3b43..08d3a6a0 100644 --- a/TerminalDocs/customize-settings/profile-appearance.md +++ b/TerminalDocs/customize-settings/profile-appearance.md @@ -37,11 +37,19 @@ This is the name of the color scheme used in the profile. Color schemes are defi **Default value:** `"Campbell"` -### Font face +### Font + +This is the structure within which the other font settings must be defined. An example of what this could look like in the JSON file is shown below. + +**Property name:** `font` + +**Necessity:** Optional + +### Font Face This is the name of the font face used in the profile. The terminal will try to fallback to Consolas if this can't be found or is invalid. To learn about the other variants of the default font, Cascadia Mono, visit the [Cascadia Code page](./../cascadia-code.md). -**Property name:** `fontFace` +**Property name:** `face` (defined within the `font` object) **Necessity:** Optional @@ -53,7 +61,7 @@ This is the name of the font face used in the profile. The terminal will try to This sets the profile's font size in points. -**Property name:** `fontSize` +**Property name:** `size` (defined within the `font` object) **Necessity:** Optional @@ -65,7 +73,7 @@ This sets the profile's font size in points. This sets the weight (lightness or heaviness of the strokes) for the profile's font. -**Property name:** `fontWeight` +**Property name:** `weight` (defined within the `font` object) **Necessity:** Optional @@ -73,6 +81,16 @@ This sets the weight (lightness or heaviness of the strokes) for the profile's f **Default value:** `"normal"` +### Font example + +```json +"font": { + "face": "Cascadia Mono", + "size": 12, + "weight": "normal" +} +``` + ## Retro terminal effects :::row::: diff --git a/TerminalDocs/get-started.md b/TerminalDocs/get-started.md index 98dbf523..e584aaaf 100644 --- a/TerminalDocs/get-started.md +++ b/TerminalDocs/get-started.md @@ -61,7 +61,7 @@ You can open a new tab of the default profile by pressing Ctrl+S ## Invoke the command palette -You can invoke most features of Windows Terminal through the [command palette](./command-palette.md). The default key combination to invoke it is Ctrl+Shift+P. +You can invoke most features of Windows Terminal through the [command palette](./command-palette.md). The default key combination to invoke it is Ctrl+Shift+P. You can also open it using the **Command palette** button in the dropdown menu. ![Example of the command palette in use](./images/command-palette-iterable-commands.gif) @@ -71,12 +71,11 @@ You can run multiple shells side-by-side using panes. To open a pane, you can us ## Configuration -To customize the settings of your Windows Terminal, select **Settings** in the dropdown menu. This will open the `settings.json` file in your default text editor. (The default text editor is defined in your [Windows settings](ms-settings:defaultapps).) - -The terminal supports customization of global properties that affect the whole application, [profile properties](./customize-settings/profile-general.md) that affect the settings of each profile, and [actions](./customize-settings/actions.md) that allow you to interact with the terminal using your keyboard or the command palette. +To customize the settings of your Windows Terminal, select **Settings** in the dropdown menu. This will open the settings UI to configure your settings. You can learn how to open the settings UI on the [Actions page](./customize-settings/actions.md#application-level-commands). > [!TIP] -> You can also use the settings UI to configure your settings if you are using [Windows Terminal Preview](https://aka.ms/terminal-preview). You can learn how to open the settings UI on the [Actions page](./customize-settings/actions.md#application-level-commands). +> If you prefer to configure your settings by edit file, click the "setting" icon, This will open the `settings.json` file in your default text editor. (The default text editor is defined in your [Windows settings](ms-settings:defaultapps).) +> The terminal supports customization of global properties that affect the whole application, [profile properties](./customize-settings/profile-general.md) that affect the settings of each profile, and [actions](./customize-settings/actions.md) that allow you to interact with the terminal using your keyboard or the command palette. ## Command line arguments diff --git a/TerminalDocs/troubleshooting.md b/TerminalDocs/troubleshooting.md index 7ff0fb6c..dacd5324 100644 --- a/TerminalDocs/troubleshooting.md +++ b/TerminalDocs/troubleshooting.md @@ -112,7 +112,7 @@ Only images linked from a file location can be rendered as profile icons in the ## Technical Notes -Applications that use the [`GetConsoleScreenBufferInfo` family of APIs](https://docs.microsoft.com/windows/console/getconsolescreenbufferinfoex) to retrieve the active console colors in Win32 format and then attempt to transform them into cross-platform VT sequences (for example, by transforming `BACKGROUND_RED` to `\x1b[41m`) may interfere with Terminal's ability to detect what background color the application is attempting to use. +Applications that use the [`GetConsoleScreenBufferInfo` family of APIs](/windows/console/getconsolescreenbufferinfoex) to retrieve the active console colors in Win32 format and then attempt to transform them into cross-platform VT sequences (for example, by transforming `BACKGROUND_RED` to `\x1b[41m`) may interfere with Terminal's ability to detect what background color the application is attempting to use. Application developers are encouraged to choose either Windows API functions _or_ VT sequences for adjusting colors and not attempt to mix them. @@ -138,3 +138,22 @@ Starting in Windows Terminal 1.5, the Terminal will display a warning if the "To 5. Hit "Ok", and restart the PC. After restarting the machine, the service should auto-start, and the dialog should no longer appear. + +## Why do I see blinking or flashing when using a git bash command line? + +You may notice a blinking or flashing when using a git bash command line inside Windows Terminal. This behavior is actually by design. The Terminal is obeying what git bash is telling it to do (setting bell-style to visible, causing a flash to associate with the bell response), BUT we understand this may be distracting. To fix this, open the `.inputrc` file for your Git bash with a text editor. This file will likely be located in the path `C:\Program Files\Git\etc`. To open with the Nano text editor: `nano ~/.inputrc` + +Change the default: + +```bash +# none, visible or audible +set bell-style visible +``` + +Set the bell-style to either `none` or `audible` to remove the visible flash: + +```bash +set bell-style none +``` + +Press Ctrl + O and Ctrl + X to Save and Exit. diff --git a/TerminalDocs/tutorials/powerline-setup.md b/TerminalDocs/tutorials/powerline-setup.md index d065e2f6..a98709de 100644 --- a/TerminalDocs/tutorials/powerline-setup.md +++ b/TerminalDocs/tutorials/powerline-setup.md @@ -40,11 +40,11 @@ Using PowerShell, install Posh-Git and Oh-My-Posh: ```powershell Install-Module posh-git -Scope CurrentUser -Install-Module oh-my-posh -Scope CurrentUser +Install-Module oh-my-posh -Scope CurrentUser -RequiredVersion 2.0.412 ``` > [!TIP] -> You may need to install NuGet if you don't already have it. Your PowerShell command line will ask if you want to install NuGet if this is the case. Select [Y] Yes. You may also need to approve that you are installing modules from [PSGallery](/powershell/scripting/gallery/getting-started), an 'untrusted repository'. Select [Y] Yes. +> You may need to install NuGet if you don't already have it. You may also need to approve that you are installing modules from [PSGallery](/powershell/scripting/gallery/getting-started), an 'untrusted repository'. [Posh-Git](https://github.com/dahlbyk/posh-git) adds Git status information to your prompt as well as tab-completion for Git commands, parameters, remotes, and branch names. [Oh-My-Posh](https://github.com/JanDeDobbeleer/oh-my-posh) provides theme capabilities for your PowerShell prompt. @@ -76,7 +76,7 @@ function without the need for additional icons. You can also [create a custom th ### Set Cascadia Code PL as your font -To set the Cascadia Code PL font for use with PowerLine (after downloading, unzipping, and installing on your system), you will need to open your [profile settings](../customize-settings/profile-appearance.md) in your settings.json file by selecting **Settings** (Ctrl+,) from your Windows Terminal dropdown menu. This can also be done using the settings UI if you have it enabled. +To set the Cascadia Code PL font for use with PowerLine (after [downloading the Cascadia Code font](https://github.com/microsoft/cascadia-code/releases), unzipping, and installing on your system), you will need to open your [profile settings](../customize-settings/profile-appearance.md) in your settings.json file by selecting **Settings** (Ctrl+,) from your Windows Terminal dropdown menu. This can also be done using the settings UI if you have it enabled. Once your settings.json file opens, find the Windows PowerShell profile and add: `"fontFace": "Cascadia Code PL"` to designate Cascadia Code PL as the font. This will provide those nice Cascadia Code Powerline glyphs. You should notice the change in your terminal as soon as you select **Save** in your editor.