Skip to content

Commit

Permalink
Merge main into live (#585)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>
Co-authored-by: Mike Griese <migrie@microsoft.com>
Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>
Co-authored-by: Carlos Zamora <carlos.zamora@microsoft.com>
Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>
Co-authored-by: Sergey <45919738+serd2011@users.noreply.github.com>
Co-authored-by: Shubham Gogna <36936863+shgogna@users.noreply.github.com>
Co-authored-by: Alma Jenks <v-alje@microsoft.com>
Co-authored-by: Jason Howell <5067358+JasonWHowell@users.noreply.github.com>
Co-authored-by: Schuyler Rosefield <Rosefield@users.noreply.github.com>
Co-authored-by: Sanam <31341013+sanamhub@users.noreply.github.com>
Co-authored-by: Haltarys <45515869+Haltarys@users.noreply.github.com>
Co-authored-by: Nikolas Grottendieck <git@nikolasgrottendieck.com>
Co-authored-by: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Co-authored-by: Shawn Melton <11204251+wsmelton@users.noreply.github.com>
Co-authored-by: Alex Buck <abuck@microsoft.com>
Co-authored-by: Adrien Clairembault <42734840+AdrienClairembault@users.noreply.github.com>
Co-authored-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
Co-authored-by: Joshua Cook <me@joshuacook.dev>
Co-authored-by: Aaron Junker <aaron.junker@outlook.com>
Co-authored-by: Jan De Dobbeleer <2492783+JanDeDobbeleer@users.noreply.github.com>
Co-authored-by: Alexey Grigorev <alexeygrigorev@users.noreply.github.com>
Co-authored-by: Tobi <22715034+twobiers@users.noreply.github.com>
Co-authored-by: Hans Kilian <hkkilian@gmail.com>
Co-authored-by: André Costa <andreccosta@me.com>
Co-authored-by: Haroon Ali Shah <jharoonalishah@gmail.com>
  • Loading branch information
1 parent 948178c commit d2588a3
Show file tree
Hide file tree
Showing 7 changed files with 253 additions and 3 deletions.
66 changes: 66 additions & 0 deletions TerminalDocs/custom-terminal-gallery/theme-gallery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Windows Terminal Themes Gallery
description: Some sample theme configurations for Windows Terminal.
author: zadjii-msft
ms.author: migrie
ms.date: 09/13/2022
ms.topic: sample
---

# Theme gallery ([Preview](https://aka.ms/terminal-preview))

Below are some examples of [Themes](./../customize-settings/themes.md).

## Seamless

![Windows Terminal Seamless Theme](./../images/seamless-theme-example.gif)

```json
{
"name": "Seamless",
"tab":
{
"background": "terminalBackground",
"unfocusedBackground": "#FFFFFF00",
"showCloseButton": "always"
},
"tabRow":
{
"background": "terminalBackground",
"unfocusedBackground": "#2C2C2CFF"
},
"window":
{
"applicationTheme": "dark"
}
},
```

## Under Construction

![Windows Terminal Under Construction Theme](./../images/Under-Construction-Theme.png)

```json
{
"name": "Under Contruction",
"tab":
{
"background": "#FFFF00FF",
"showCloseButton": "always",
"unfocusedBackground": "#88440088"
},
"tabRow":
{
"background": "#FF8800FF",
"unfocusedBackground": "#202020FF"
},
"window":
{
"applicationTheme": "light",
"useMica": true
}
},
```

(Color scheme is based on [Fun Forrest](https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/windowsterminal/FunForrest.json))

12 changes: 12 additions & 0 deletions TerminalDocs/customize-settings/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,18 @@ This inserts the content that was copied onto the clipboard.
{ "command": "paste", "keys": "shift+insert" }
```

### Expand selection to word ([Preview](https://aka.ms/terminal-preview))

If a selection exists, this expands the selection to fully encompass any words partially selected.

**Command name:** `expandSelectionToWord`

**Default bindings:**

```json
{ "command": "expandSelectionToWord" }
```

### Select all

This selects all of the content in the text buffer.
Expand Down
19 changes: 17 additions & 2 deletions TerminalDocs/customize-settings/appearance.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This sets the theme of the application. `"system"` will use the same theme as Wi

**Necessity:** Optional

**Accepts:** `"system"`, `"dark"`, `"light"`
**Accepts:** `"system"`, `"dark"`, `"light"`, name of custom [theme](./themes.md)

**Default value:** `"system"`

Expand All @@ -58,7 +58,6 @@ When this is set to `true`, tabs are always displayed. When it's set to `false`
> [!NOTE]
> This setting has no effect when `showTabsInTitlebar` is `true`.

**Property name:** `alwaysShowTabs`

**Necessity:** Optional
Expand All @@ -78,6 +77,22 @@ When this is set to `true`, tabs are always displayed. When it's set to `false`

___

## Position of newly created tabs ([Preview](https://aka.ms/terminal-preview))

Specifies where new tabs appear in the tab row. When this is set to `"afterLastTab"`, new tabs appear at the end of the tab row. When it's set to `"afterCurrentTab"`, new tabs appear after the current tab.

**Property name:** `newTabPosition`

**Necessity:** Optional

**Accepts:** `"afterLastTab"`, `"afterCurrentTab"`

**Default value:** `"afterLastTab"`

<br />

___

## Hide the title bar

:::row:::
Expand Down
155 changes: 155 additions & 0 deletions TerminalDocs/customize-settings/themes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
title: Windows Terminal Theme Settings
description: Learn how to customize the theme settings within Windows Terminal.
author: zadjii-msft
ms.author: migrie
ms.date: 09/12/2022
ms.topic: how-to
---

# Theme settings in Windows Terminal ([Preview](https://aka.ms/terminal-preview))

The settings listed below affect the visuals of the terminal window itself, rather than the appearance of an individual tab/pane. These settings are currently only editable directly in the [settings.json file](../install.md#settings-json-file) and are not configurable via the settings UI.

```json
"theme": "dark"
"themes":
[
// THEME OBJECTS
]
```

For some example themes, take a look at the [Themes gallery](./../custom-terminal-gallery/theme-gallery.md).

Each theme in the `themes` list is comprised of a collection of property objects, that specify the properties of individual elements of the application. For example, the default `"dark"` theme is the following:

```json
{
"name": "dark",
"window": {
"applicationTheme": "dark"
},
"tab": {
"background": "terminalBackground",
"unfocusedBackground": "#00000000"
},
"tabRow": {
"unfocusedBackground": "#333333FF"
}
},
```

## Theme name

This is the name of the theme. Names should be unique. The names `dark`, `light`, and `system` are reserved for the built-in default themes.

**Property name:** `name`

**Necessity:** Required

**Accepts:** Name of theme as a string

<br />

___

## Window

### Application theme

This sets the UI theme of the application. This will stylize items such as buttons, the command palette, and other application UI elements. It can either be light or dark. `"system"` will use the same theme as Windows.

**Property name:** `applicationTheme`

**Necessity:** Optional

**Accepts:** `"system"`, `"dark"`, `"light"`

**Default value:** `"dark"`

<br />

___

## Tab row

These settings are used to configure the appearance of the tab row. When `showTabsInTitlebar` is `true` (the default), this configures the title bar.

### Background color

The color of the tab row when the window is in the foreground.

**Property name:** `background`

**Necessity:** Optional

**Accepts:** a [theme color](#theme-colors).

### Inactive background color

The color of the tab row when the window is inactive.

**Property name:** `unfocusedBackground`

**Necessity:** Optional

**Accepts:** a [theme color](#theme-colors).

<br />

___

## Tabs

### Background color

The color of the active tab. Setting a `tabColor` in a profile will override this value. Similarly, setting a color at runtime with the tab color picker will override this color.

This color is always treated as a solid color, even if set to a `terminalBackground` of a pane with an acrylic background.

**Property name:** `background`

**Necessity:** Optional

**Accepts:** a [theme color](#theme-colors).

### Inactive background color

The color of inactive tabs. Setting a `tabColor` in a profile will override this value. Similarly, setting a color at runtime with the tab color picker will override this color.

This color is always treated as a solid color, even if set to a `terminalBackground` of a pane with an acrylic background.

When set to `terminalBackground` or `accent`, this will automatically use an alpha value of 30%, to be semi-transparent.

**Property name:** `unfocusedBackground`

**Necessity:** Optional

**Accepts:** a [theme color](#theme-colors).

### Show close button

Configures how the "close" button on the tab should appear. This accepts the following values:
* `"always"`: Always show tab close buttons.
* `"hover"`: Show the tab close button on the active tab, and any tabs that are hovered with the mouse.
* `"never"`: Never show tab close buttons. This also disables the ability to close the tab with the middle mouse button.

**Property name:** `showCloseButton`

**Necessity:** Optional

**Accepts:** `"always"`, `"hover"`, `"never"`

**Default value:** `"always"`

<br />

___

## Theme colors

The colors used in themes both accept RGBA color values, as well as a few special strings for custom values. The accepted values are as follows:

* `"#rgb`, `"#rrggbb`, `"#rrggbbaa`: An RGB color value. When the alpha chanel is omitted, these colors default to a fully opaque alpha channel.
* `"accent"`: This is a special value that means "the accent color set in the system settings".
* `"terminalBackground"`: This is a special value evaluated to mean "the background color of the active terminal pane". If there are multiple panes in a tab, then this is the color of the active one. This always uses the `background` of the profile - it ignores anything from a `backgroundImage`, if set.
Binary file added TerminalDocs/images/Under-Construction-Theme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added TerminalDocs/images/seamless-theme-example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion TerminalDocs/selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ You can create a selection by using the `selectAll` or `markMode` actions. The `
| <kbd>Ctrl</kbd> + <kbd>Home</kbd> | Move to the beginning of the buffer |
| <kbd>Ctrl</kbd> + <kbd>End</kbd> | Move to the end of the buffer |

When in mark mode, you can use <kbd>Tab</kbd> or <kbd>Shift</kbd> + <kbd>Tab</kbd> to navigate to the next or previous hyperlink in the buffer. Windows Terminal can automatically detect hyperlinks if [`experimental.detectUrls`](/windows/terminal/customize-settings/interaction#automatically-detect-urls-and-make-them-clickable) is enabled.

Regardless of being in mark mode, you can expand an existing selection using the following non-configurable key bindings:

| Key binding | Result |
Expand Down Expand Up @@ -82,4 +84,4 @@ Color schemes let you customize the selection color using the `selectionBackgrou

## Customizing word delimiters

As mentioned above, double-clicking and using <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + Arrow keys (or <kbd>Ctrl</kbd> + Arrow keys when in mark mode) allow you to navigate by word. However, words can be separated by more than just whitespace. You can customize these word boundaries using the `wordDelimiters` global setting.
As mentioned above, double-clicking and using <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + Arrow keys (or <kbd>Ctrl</kbd> + Arrow keys when in mark mode) allow you to navigate by word. However, words can be separated by more than just whitespace. You can customize these word boundaries using the `wordDelimiters` global setting.

0 comments on commit d2588a3

Please sign in to comment.