๐ This is a simple script to add right click context menu for your best Windows terminal โค
Inspired from Windows terminal issue Add "open Windows terminal here" into right-click context menu #1060. Thanks to you all giants โค
Windows terminal is an excellent terminal. But it does not offer a basic function which is right click context menu!
Without it, I have to cd
to my working directory everytime. It's inefficient.
So I wrote this script to deal with it.
Clone this repo
git clone https://github.com/kerol2r20/Windows-terminal-context-menu
Run powershell (no need to get admin access right)
Change the execution policy Set-ExecutionPolicy Unrestricted -scope CurrentUser
Run SetupContextMenu.ps1
script
โ ๏ธ If you find no item in your context menu, it may be caused by the old style profiles.json. You can delete %LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json
and restart Windows terminal. The new one will be generated. Ref to microsoft/terminal#4556
SetupContextMenu.ps1 -uninstall:$true
This script will parse the settings.json
file to generate menu items. However you can customize it.
Put any icon file into icon
folder and modify the config.json
like the following.
{
"global": {
"extended": false
},
"profiles": {
"{a5a97cb8-8961-5535-816d-772efe0c6a3f}": {
"icon": "arch.ico",
"label": "Arch Linux"
},
"{61c54bbd-c2c6-5271-96e7-009a87ff44bf}": {
"showRunAs": true
},
"{b453ae62-4e3d-5e58-b989-0a998ec441b8}": {
"hidden": true
}
}
}
Config reference
shift
settings.json
run as administrator
item for this profileI'm not sure that icons file are legal or not. If you feel it is not ok, please tell me. Thanks.