|
| 1 | +[English](#windows-terminal-context-menu) | [简体中文](#windows-terminal-上下文菜单) |
| 2 | + |
| 3 | +# Windows Terminal Context Menu |
| 4 | + |
| 5 | +The script provided by this repository can generate `Terminal here` right-click menus in File Explorer for Windows Terminal. |
| 6 | + |
| 7 | +- Licensed under [the MIT Licence](LICENSE). |
| 8 | +- Adapted from [lextm/windowsterminal-shell](https://github.com/lextm/windowsterminal-shell). |
| 9 | + |
| 10 | +## How to use |
| 11 | + |
| 12 | +- These scripts require [new PowerShell](https://github.com/PowerShell/PowerShell) (version at least 6). |
| 13 | + |
| 14 | +Clone this repository and extract it, then open PowerShell and run `generate.ps1`. |
| 15 | + |
| 16 | +- *If your system does not allow to execute unsigned PowerShell scripts, you can execute the following command to allow the current PowerShell process to execute unsigned scripts:* |
| 17 | + |
| 18 | + ```powershell |
| 19 | + Set-ExecutionPolicy Bypass -Scope Process |
| 20 | + ``` |
| 21 | +
|
| 22 | +`generate.ps1` supports the following parameters: |
| 23 | +
|
| 24 | +`-Layout` : Indicates the menus layout |
| 25 | +
|
| 26 | +- `Compact`: Items in nested menus (default) |
| 27 | +- `Flat`: Items in the top menu |
| 28 | +- `Minimal`: Minimal layout (run Terminal with the default profile) |
| 29 | +
|
| 30 | +`-Extended`: Whether are extended menus (shows only when holding down the `Shift` key) |
| 31 | +
|
| 32 | +- `No`: No (default) |
| 33 | +- `Yes`: Yes |
| 34 | +- `Admin`: Only the items that run Terminal as administrator |
| 35 | +
|
| 36 | +`-NoAdmin`: Do not add items that run Terminal as administrator |
| 37 | +
|
| 38 | +`-Language`: Specifies which language to use for the menu items (if not specified, the system language will be used) |
| 39 | +
|
| 40 | +To remove the menus, please run `remove.ps1`. |
| 41 | +
|
| 42 | +--- |
| 43 | +
|
| 44 | +# Windows Terminal 上下文菜单 |
| 45 | +
|
| 46 | +该仓库提供的脚本可以为 Windows Terminal 在文件管理器中生成 `在此处打开终端` 的右键菜单。 |
| 47 | +
|
| 48 | +- 以 [MIT Licence](LICENSE) 许可。 |
| 49 | +- 修改自 [lextm/windowsterminal-shell](https://github.com/lextm/windowsterminal-shell)。 |
| 50 | +
|
| 51 | +## 怎么用 |
| 52 | +
|
| 53 | +- 这些脚本需要[新 PowerShell](https://github.com/PowerShell/PowerShell)(版本至少为 6)。 |
| 54 | +
|
| 55 | +克隆这个仓库,然后打开 PowerShell 运行 `generate.ps1`。 |
| 56 | +
|
| 57 | +- *如果你的系统不允许执行未签名的 PowerShell 脚本,你可以执行以下命令以允许当前 PowerShell 进程执行未签名脚本:* |
| 58 | +
|
| 59 | + ```powershell |
| 60 | + Set-ExecutionPolicy Bypass -Scope Process |
| 61 | + ``` |
| 62 | +
|
| 63 | +`generate.ps1` 支持以下参数: |
| 64 | +
|
| 65 | +`-Layout`:菜单布局 |
| 66 | +
|
| 67 | +- `Compact`:条目在二级菜单(默认) |
| 68 | +- `Flat`:条目在一级菜单 |
| 69 | +- `Minimal`:迷你布局(以默认配置运行终端) |
| 70 | +
|
| 71 | +`-Extended`:是否为扩展菜单(仅在按住 `Shift` 键时显示) |
| 72 | +
|
| 73 | +- `No`:否(默认) |
| 74 | +- `Yes`:是 |
| 75 | +- `Admin`:仅以管理员身份运行的选项 |
| 76 | +
|
| 77 | +`-NoAdmin`: 不添加以管理员身份运行的选项 |
| 78 | +
|
| 79 | +`-Language`:指定要在菜单选项中使用的语言(如果未指定,将使用系统语言) |
| 80 | +
|
| 81 | +要移除菜单,请运行 `remove.ps1`。 |
0 commit comments