Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

June updates #346

Merged
merged 61 commits into from
Jun 18, 2021
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
6591759
command-line-arguments.md: Tag the Command Prompt code blocks
SamB Jan 29, 2021
eebc37c
fixed typo (#220)
boop5 Jan 29, 2021
a69ab41
Add note about escaping characters with backslash (#230)
mattwojo Jan 29, 2021
6fc0e34
Add icon example and folder location (#231)
mattwojo Jan 29, 2021
5d6171c
Fix default value by escaping characters (#232)
mattwojo Jan 29, 2021
7f9ca36
Add info about the command palette (#180)
skycommand Jan 30, 2021
a165f1a
Add backslash escape note (#233)
mattwojo Jan 30, 2021
0c27f87
Add a note about hiding dynamic profiles (#186)
zadjii-msft Jan 30, 2021
635421f
Clarify adding profile in ssh tutorial. Fixes #183 (#193)
camerondurham Jan 30, 2021
d503b92
Add guid command for powershell (#234)
mattwojo Jan 30, 2021
40de5ee
Change "i.e." to "e.g." (#207)
fuglede Jan 30, 2021
737c169
Old Ubuntu: Use up-to-date version of golang (#216)
justjanne Jan 30, 2021
9544259
Add startingDirectory example (#237)
mattwojo Feb 2, 2021
82a2f56
remove icon file type
mattwojo Feb 3, 2021
65c6d39
Change icon description to example
mattwojo Feb 3, 2021
6090a3e
Change false to true
mattwojo Feb 3, 2021
ca0e2ab
Remove unnecessary sentence
mattwojo Feb 3, 2021
a6393d5
Typo fixes
mattwojo Feb 3, 2021
214341c
link fix
mattwojo Feb 3, 2021
394060f
Capitalization fixes
mattwojo Feb 3, 2021
1a2ab63
shortcut fixes
mattwojo Feb 3, 2021
57fb993
page_title_updates_terminal (#243)
v-mepa Feb 19, 2021
c489882
Add docs for `newWindow` action (#259)
zadjii-msft Feb 23, 2021
20e12c8
refactor(powerline): update for oh-my-posh V3 (#263)
JanDeDobbeleer Feb 23, 2021
157b457
Improved title setting procedure on bash/Ubuntu so that it doesn't de…
Dakkaron Feb 23, 2021
b7c6304
Update powerline-setup.md (#240)
Feb 26, 2021
549c163
Merge release 1.7 into master (#264)
cinnamon-msft Feb 27, 2021
12326f0
Merge branch 'live' into master
cinnamon-msft Feb 27, 2021
6a16709
Update powerline-setup.md (#175)
mjjames Mar 23, 2021
8cb5e9d
Fix a monor typo with the default keybinding for new tab (#287)
zadjii-msft Mar 23, 2021
7cb408c
Add a note that --window is only available in 1.7+ (#288)
zadjii-msft Mar 23, 2021
7a35ea4
Fix a typo in this doc (#289)
zadjii-msft Mar 23, 2021
64fa1d7
Add a FAQ entry for folks who are confused when Settings does nothing…
zadjii-msft Mar 23, 2021
4709f0e
Add a note that you can't set the tab color from the commandline (#291)
zadjii-msft Mar 23, 2021
4633866
Add UUID generator option
mattwojo Mar 23, 2021
ddae6b8
Add online guid generator
mattwojo Mar 23, 2021
7003737
Add instructions to open defaults.json file
mattwojo Mar 23, 2021
d76ab6c
Update panes.md
mattwojo Mar 24, 2021
6533054
Add note about using settings.json...
mattwojo Mar 24, 2021
6ecd2dc
fix link
mattwojo Mar 24, 2021
85f0a29
Merge release-1.8 into master (#309)
cinnamon-msft Apr 14, 2021
86d2842
Merge branch 'live' into master
cinnamon-msft Apr 14, 2021
25d9bc0
Fix placement of unfocused appearance section (#312)
cinnamon-msft Apr 14, 2021
29cf3d4
Update TerminalDocs/command-line-arguments.md
cinnamon-msft Apr 14, 2021
7b6cd3e
Update TerminalDocs/command-line-arguments.md
cinnamon-msft Apr 14, 2021
0039bac
Add mouse interaction section (#297)
mattwojo Apr 30, 2021
a49a379
document how to start windows terminal and have it execute a command …
MarkIannucci Apr 30, 2021
cf3bd48
FIX syntax error in json configuration example (#308)
lpotherat Apr 30, 2021
febcf10
Document trimBlockSelection setting (#313)
Don-Vito Apr 30, 2021
92577e8
Updated openSettings default bindings. (#317)
Sophismata Apr 30, 2021
b87a0b0
Update powerline-setup.md (#319)
superfaz May 3, 2021
97777e1
Updates for 1.9 release (#328)
cinnamon-msft May 24, 2021
3fca8ae
Merge branch 'live' into master
cinnamon-msft May 24, 2021
347cc49
Fix links
cinnamon-msft May 25, 2021
f4f707d
Typo "Windows terminal"→"Windows Terminal" (#326)
hyoshioka0128 May 27, 2021
c024d3d
Add link to alternative install options (#321)
mattwojo May 27, 2021
cefb40f
Update `cursorHeight` minimum value (#278)
eugenesmlv May 27, 2021
bd8fbc5
Add link to install preview (#342)
mattwojo Jun 11, 2021
b4e9bba
Update default settings, add UI screenshots (#343)
mattwojo Jun 18, 2021
eb2e49b
Fix typos
mattwojo Jun 18, 2021
5102a86
Merge branch 'live' into master
mattwojo Jun 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions TerminalDocs/command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Windows Terminal command line arguments
description: Learn how to create command line arguments for Windows Terminal.
author: cinnamon-msft
ms.author: cinnamon
ms.date: 04/14/2021
ms.date: 05/25/2021
ms.topic: how-to
---

Expand Down Expand Up @@ -55,6 +55,22 @@ Below is the full list of supported commands and options for the `wt` command li

Commands may vary slightly depending on which command line you're using.

### Passing an argument to the default shell

To start an instance of Windows Terminal and have it execute a command, call `wt.exe` followed by your command.

Here's an example of calling Windows Terminal to pass a [ping](/windows-server/administration/windows-commands/ping) command argument to echo an IP address:

```powershell
wt ping docs.microsoft.com
```

Here's an example of calling Windows Terminal to open a new tab with a PowerShell command line, confirming to call the [Start-Service](/powershell/module/microsoft.powershell.management/start-service) command, and opening another new tab with Windows Command Prompt open to the `/k` directory:

```cmd
wt new-tab PowerShell -c Start-Service ; new-tab cmd /k dir
```

### Target a specific window

> [!IMPORTANT]
Expand Down Expand Up @@ -322,7 +338,7 @@ Execution aliases do not work in WSL distributions. If you want to use wt.exe fr
---
<!-- End tab selectors. -->

### Using application title ([Preview](https://aka.ms/terminal-preview))
### Using application title

To open a new terminal instance allowing applications within it to set the tab title by sending title change messages, use the `--useApplicationTitle` flag. To suppress these messages, use the `--suppressApplicationTitle` flag. If none of these flags are provided, the behavior is inherited from the profile's settings. To open a tab with title `tabname` that will not be overridden by the application, enter:

Expand Down Expand Up @@ -350,9 +366,6 @@ Execution aliases do not work in WSL distributions. If you want to use wt.exe fr
---
<!-- End tab selectors. -->

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Tab color

To open a new terminal instance with custom tab colors, use the `--tabColor` argument. This argument overrides the value defined in the profile, but can be overridden as well using the tab color picker. In the following example, a new terminal is created with two tabs of different colors:
Expand Down Expand Up @@ -387,7 +400,7 @@ When `--tabColor` is set for a tab, it is associated with the first pane of this
wt new-tab --tabColor #009999 ; split-pane --tabColor #f59218
```

### Color scheme ([Preview](https://aka.ms/terminal-preview))
### Color scheme

To open a new terminal instance with a specific color scheme (instead of the `colorScheme` set in the profile), use the `--colorScheme` argument. This argument overrides the value defined in the profile.

Expand Down Expand Up @@ -415,9 +428,6 @@ Execution aliases do not work in WSL distributions. If you want to use wt.exe fr
---
<!-- End tab selectors. -->

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Tab focus

To open a new terminal instance with a specific tab in focus, use the `-t` flag (or `--target`), along with the tab-index number. To open your default profile in the first tab and the "Ubuntu-18.04" profile focused in the second tab (`-t 1`), enter:
Expand Down
2 changes: 1 addition & 1 deletion TerminalDocs/custom-terminal-gallery/custom-schemes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Windows terminal Custom Color Schemes guide
title: Windows Terminal Custom Color Schemes guide
description: Some sample configurations for Windows Terminal.
author: cinnamon-msft
ms.author: cinnamon
Expand Down
192 changes: 168 additions & 24 deletions TerminalDocs/customize-settings/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Windows Terminal Actions
description: Learn how to create custom actions for Windows Terminal.
author: cinnamon-msft
ms.author: cinnamon
ms.date: 04/14/2021
ms.date: 05/25/2021
ms.topic: how-to
ms.localizationpriority: high
---
Expand Down Expand Up @@ -111,10 +111,10 @@ ___

### Modifiers

`ctrl+`, `shift+`, `alt+`
`ctrl+`, `shift+`, `alt+`, `win+`

> [!NOTE]
> The `Windows` key is not supported as a modifier.
> While the `Windows` key is supported as a modifier, the system reserves most `win+<key>` key bindings. If the OS has reserved that key binding, the terminal will never receive that binding.

### Modifier keys

Expand Down Expand Up @@ -198,14 +198,16 @@ This opens the dropdown menu.

### Open settings files

This opens either the default or custom settings files. Without the `target` field, this will open the settings.json file.
This opens either the settings UI, custom settings file (`settings.json`), or default settings file (`defaults.json`), depending on the `target` field.
Without the `target` field, the custom settings file will be opened.

**Command name:** `openSettings`

**Default bindings:**

```json
{ "command": "openSettings", "keys": "ctrl+," },
{ "command": { "action": "openSettings", "target": "settingsUI" }, "keys": "ctrl+," },
{ "command": { "action": "openSettings", "target": "settingsFile" }, "keys": "ctrl+shift+," },
{ "command": { "action": "openSettings", "target": "defaultsFile" }, "keys": "ctrl+alt+," },
```

Expand All @@ -215,9 +217,6 @@ This opens either the default or custom settings files. Without the `target` fie
| ---- | --------- | ------- | ----------- |
| `target` | Optional | `"settingsFile"`, `"defaultsFile"`, `"settingsUI"`, `"allFiles"` | The settings file to open. |

> [!IMPORTANT]
> The `"settingsUI"` value for `target` is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Toggle full screen

This allows you to switch between full screen and default window sizes.
Expand Down Expand Up @@ -372,10 +371,6 @@ This creates a new tab. Without any arguments, this will open the default profil
| `colorScheme` | Optional | The name of a color scheme as a string | The scheme to use instead of the profile's set `colorScheme` |
| `suppressApplicationTitle` | Optional | `true`, `false` | When set to `false`, applications can change the tab title by sending title change messages. When set to `true`, these messages are suppressed. If not provided, the behavior is inherited from the profile's settings. |

> [!IMPORTANT]
> The `"colorScheme"` and `"suppressApplicationTitle"` parameters are only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).


### Open next tab

This opens the tab to the right of the current one.
Expand All @@ -394,9 +389,6 @@ This opens the tab to the right of the current one.
| ---- | --------- | ------- | ----------- |
| `tabSwitcherMode` | Optional | `"mru"`, `"inOrder"`, `"disabled"` | Move to the next tab using `"tabSwitcherMode"`. If no mode is provided, use the globally defined one. |

> [!IMPORTANT]
> The `"tabSwitcherMode"` parameter is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Open previous tab

This opens the tab to the left of the current one.
Expand All @@ -415,9 +407,6 @@ This opens the tab to the left of the current one.
| ---- | --------- | ------- | ----------- |
| `tabSwitcherMode` | Optional | `"mru"`, `"inOrder"`, `"disabled"` | Move to the previous tab using `"tabSwitcherMode"`. If no mode is provided, use the globally defined one. |

> [!IMPORTANT]
> The `"tabSwitcherMode"` parameter is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Tab search

:::row:::
Expand Down Expand Up @@ -590,10 +579,7 @@ This creates a new window. Without any arguments, this will open the default pro
| `profile` | Optional | Profile's name or GUID as a string | Profile that will open based on its GUID or name. |
| `suppressApplicationTitle` | Optional | `true`, `false` | When set to `false` allows applications to change tab title by sending title change messages. When set to true `true` suppresses these messages. If not provided, the behavior is inheritted from profile settings. |

> [!IMPORTANT]
> The `"suppressApplicationTitle"` parameter is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Rename window ([Preview](https://aka.ms/terminal-preview))
### Rename window

This command can be used to rename a window to a specific string.

Expand All @@ -617,8 +603,43 @@ _This command is not currently bound in the default settings_.
| ---- | --------- | ------- | ----------- |
| `name` | Optional | String | The new name to use for this window. If omitted, this command will revert the window name back to its original value. |

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview), version 1.7+.
### Open window rename dialog

This command changes displays a popup window that lets you edit the name for the current window. Clearing the text field will reset the window name.

**Command name:** `openWindowRenamer`

**Default binding:**

```json
{ "command": "openWindowRenamer" }
```

### Identify window

This pops up an overlay on the focused window that displays the window's name and index.

**Command name:** `identifyWindow`

**Default binding:**

```json
{"command": "identifyWindow", "keys": "" },
```

### Identify windows

This pops up an overlay on all windows that displays each window's name and index.

**Command name:** `identifyWindows`

**Default binding:**

_This command is not currently bound in the default settings_.

```json
{"command": "identifyWindows" },
```

### Open window rename dialog ([Preview](https://aka.ms/terminal-preview))

Expand Down Expand Up @@ -668,6 +689,7 @@ _This command is not currently bound in the default settings_.
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

<br />

___

## Pane management commands
Expand Down Expand Up @@ -1008,6 +1030,128 @@ Changes the active color scheme.

___

## Global commands

### Global summon ([Preview](https://aka.ms/terminal-preview))

This is a special action that works globally in the OS, rather than only in the context of the terminal window. When pressed, this action will summon the terminal window. Which window is summoned, where the window is summoned to, and how the window behaves when summoning it, is controlled by the properties on this action.

**Notes**
* Any keys bound to `globalSummon` actions in the terminal will not work in other applications while the terminal is running - they will always focus the terminal window.

* If another running application already registered for the given `keys` using the `RegisterHotKey` API, the terminal will be unable to listen for those key strokes.

* Elevated and unelevated instances of the terminal will not be able to both register for the same keys. The same applies to both Preview and Stable versions of the terminal - the first one to be launched will always win.

* These key strokes will only work when an instance of the terminal is already running. To launch the terminal automatically on login, see [`startOnUserLogin`](./startup.md#launch-on-machine-startup).

**Command name:** `globalSummon`

**Default binding:**

_This command is not currently bound in the default settings_.

```json
{ "keys": "", "command": { "action": "globalSummon" } }
```

#### Arguments

| Name | Necessity | Accepts | Description |
| ---- | --------- | ------- | ----------- |
| `desktop` | Optional | `any`, `toCurrent`, `onCurrent` | This controls how the terminal should interact with virtual desktops.<ul><li>`"any"`: Leave the window on whichever desktop it's already on - will switch to that desktop as the window is activated.</li><li>`"toCurrent"` (_default_): Move the window to the current virtual desktop.</li><li>`"onCurrent"`: Only summon the window if it's already on the current virtual desktop.</li></ul> |
| `monitor` | Optional | `any`, `toCurrent`, `toMouse` | This controls the monitor that the window will be summoned from/to.<ul><li>`"any"`: Summon the most recently used window, regardless of which monitor it's currently on.</li><li>`"toCurrent"`: Summon the most recently used window to the monitor with the current foreground window.</li><li>`"toMouse"` (_default_): Summon the most recently used window to the monitor where the mouse cursor is.</li></ul> |
| `name` | Optional | String | When omitted (_default_), use `monitor` and `desktop` to find the appropriate most-recently-used window to summon. When provided, summon the window whose name or ID matches the given `name` value. If no such window exists, then create a new window with that name. |
| `dropdownDuration` | Optional | Integer | Defaults to `0`. When provided with a positive number, "slide" the window in from the top of the screen using an animation that lasts `dropdownDuration` milliseconds. `200` is a reasonable value for this setting. |
| `toggleVisibility` | Optional | `true`, `false` | Defaults to `true`. When `true`, pressing the assigned keys for this action will dismiss (minimize) the window when the window is currently the foreground window. When `false`, pressing the assigned keys will only ever bring the window to the foreground. |

When `name` is provided _with_ `monitor` or `desktop`, `name` behaves in the following
ways:
* `desktop`
- `"any"`: Go to the desktop the given window is already on.
- `"toCurrent"`: If the window is on another virtual desktop, then move it to the currently active one.
- `"onCurrent"`: If the window is on another virtual desktop, then move it to the currently active one.
* `monitor`
- `"any"`: Leave the window on the monitor it is already on.
- `"toCurrent"`: If the window is on another monitor, then move it to the monitor with the current foreground window.
- `"toMouse"`: If the window is on another monitor, then move it to the monitor with the mouse cursor on it.

The `desktop` and `monitor` properties can be combined in the following ways:

| | `"desktop"` | | |
| -- | --------- | -- | -- |
| **`"monitor"`** | `"any"`<br />**Leave where it is** | `"toCurrent"`<br />**Move to current desktop** | `"onCurrent"`<br />**On current desktop only** |
| `"any"`<br />**Summon the MRU window** | Go to the desktop the window is on (leave position alone) | Move the window to this desktop (leave position alone) | If there isn't one on this desktop:<ul><li>Create a new one in the default position</li></ul>Else:<ul><li>Activate the one on this desktop (don't move it)</li></ul> |
| `"toCurrent"`<br />**Summon the MRU window TO the monitor with the foreground window** | Go to the desktop the window is on, move to the monitor with the foreground window | Move the window to this desktop, move to the monitor with the foreground window | If there isn't one on this desktop:<ul><li>Create a new one</li></ul>Else:<ul><li>Activate the one on this desktop, move to the monitor with the foreground window</li></ul> |
| `"toMouse"`<br />**Summon the MRU window TO the monitor with the mouse** | Go to the desktop the window is on, move to the monitor with the mouse | Move the window to this desktop, move to the monitor with the mouse | If there isn't one on this desktop:<ul><li>Create a new one</li></ul>Else:<ul><li>Activate the one on this desktop, move to the monitor with the mouse</li></ul> |

#### Examples

```jsonc

// Summon the most recently used (MRU) window, to the current virtual desktop,
// to the monitor the mouse cursor is on, without an animation. If the window is
// already in the foreground, then minimize it.
{ "keys": "ctrl+1", "command": { "action": "globalSummon" } },

// Summon the MRU window, by going to the virtual desktop the window is
// currently on. Move the window to the monitor the mouse is on.
{ "keys": "ctrl+2", "command": { "action": "globalSummon", "desktop": "any" } },

// Summon the MRU window to the current desktop, leaving the position of the window untouched.
{ "keys": "ctrl+3", "command": { "action": "globalSummon", "monitor": "any" } },

// Summon the MRU window, by going to the virtual desktop the window is
// currently on, leaving the position of the window untouched.
{ "keys": "ctrl+4", "command": { "action": "globalSummon", "desktop": "any", "monitor": "any" } },

// Summon the MRU window with a dropdown duration of 200ms.
{ "keys": "ctrl+5", "command": { "action": "globalSummon", "dropdownDuration": 200 } },

// Summon the MRU window. If the window is already in the foreground, do nothing.
{ "keys": "ctrl+6", "command": { "action": "globalSummon", "toggleVisibility": false } },

// Summon the window named "_quake". If no window with that name exists, then create a new window.
{ "keys": "ctrl+7", "command": { "action": "globalSummon", "name": "_quake" } }
```

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Open the quake mode window ([Preview](https://aka.ms/terminal-preview))

:::row:::
:::column span="":::
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" } }
```

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.

**Command name:** `quakeMode`

**Default binding:**

```json
{ "keys": "win+`", "command": { "action": "quakeMode" } }
```

:::column-end:::
:::column span="":::
![Windows Terminal quake mode](./../images/quake-mode.gif)

:::column-end:::
:::row-end:::

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

<br />

___

## Unbind keys

This unbinds the associated keys from any command.
Expand Down
Loading