Windows Terminal Preview Context Menu

If you use multiple Linux WSL, you can enhance your productivity with this tool.

Install

Clone this repo
git clone https://github.com/rescenic/wt.context.menu

Configure your settings.json in Windows Terminal Preview folder & config.js…


This content originally appeared on DEV Community and was authored by Muhammad Ridwan Hakim

If you use multiple Linux WSL, you can enhance your productivity with this tool.

Install

  1. Clone this repo git clone https://github.com/rescenic/wt.context.menu
  2. Configure your settings.json in Windows Terminal Preview folder & config.json C:\Users\%USERNAME%\AppData\Local\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState\settings.json wt.2
  3. Copy folder icons to C:\Users\%USERNAME%\AppData\Local\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState\icons\
  4. Run powershell (no need to get admin access right)
  5. Change the execution policy Set-ExecutionPolicy Unrestricted -scope CurrentUser
  6. Run SetupContextMenu.ps1 script wt.3 wt.4 wt.5

Uninstall

Run SetupContextMenu.ps1 -uninstall:$true

Config

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

  • global
    • extended[bool]: if set this to true, context menu will only show up when right click with shift
  • profiles
    • guid[string]: this GUID of your profile defined in settings.json
      • hidden[bool]: overwrites the visibility of the profile, if defined
      • icon[string]: filename of your ico file, you must put this file in icon folder
      • label[string]: context menu label
      • showRunAs[bool]: add run as administrator item for this profile


This content originally appeared on DEV Community and was authored by Muhammad Ridwan Hakim


Print Share Comment Cite Upload Translate Updates
APA

Muhammad Ridwan Hakim | Sciencx (2021-08-21T23:11:02+00:00) Windows Terminal Preview Context Menu. Retrieved from https://www.scien.cx/2021/08/21/windows-terminal-preview-context-menu/

MLA
" » Windows Terminal Preview Context Menu." Muhammad Ridwan Hakim | Sciencx - Saturday August 21, 2021, https://www.scien.cx/2021/08/21/windows-terminal-preview-context-menu/
HARVARD
Muhammad Ridwan Hakim | Sciencx Saturday August 21, 2021 » Windows Terminal Preview Context Menu., viewed ,<https://www.scien.cx/2021/08/21/windows-terminal-preview-context-menu/>
VANCOUVER
Muhammad Ridwan Hakim | Sciencx - » Windows Terminal Preview Context Menu. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/21/windows-terminal-preview-context-menu/
CHICAGO
" » Windows Terminal Preview Context Menu." Muhammad Ridwan Hakim | Sciencx - Accessed . https://www.scien.cx/2021/08/21/windows-terminal-preview-context-menu/
IEEE
" » Windows Terminal Preview Context Menu." Muhammad Ridwan Hakim | Sciencx [Online]. Available: https://www.scien.cx/2021/08/21/windows-terminal-preview-context-menu/. [Accessed: ]
rf:citation
» Windows Terminal Preview Context Menu | Muhammad Ridwan Hakim | Sciencx | https://www.scien.cx/2021/08/21/windows-terminal-preview-context-menu/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.