Giter VIP home page Giter VIP logo

windowsterminal-shell's Introduction

PowerShell Scripts to Install/Uninstall Context Menu Items for Windows Terminal

A project backed by LeXtudio Inc.

Install

  1. Install Windows Terminal.

  2. Install PowerShell 7.

  3. Launch PowerShell 7 console as administrator, and run install.ps1 to install context menu items to Windows Explorer.

    Quickest way to run the latest script from GitHub at an elevated PowerShell 7 console is

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/lextm/windowsterminal-shell/master/install.ps1'))

Now the menu items are added to Windows Explorer context menu.

default layout

Figure 1: Default layout

The menu items are organized in the default layout. Other layouts such as mini and flat give different look and feel. To apply an alternative layout (like mini), simply run install.ps1 mini.

flat layout

Figure 2: Flat layout

mini layout

Figure 3: Mini layout

Uninstall

  1. Run uninstall.ps1 to uninstall context menu items from Windows Explorer.

To uninstall an alternative layout (like mini), run uninstall.ps1 mini.

Notes

The current release only supports Windows 10 machines (Windows Terminal restriction) and Windows Terminal installed via the store or .appx file.

If Windows Terminal is installed via Scoop, scripts from another repo might help.

The install script must be run as administrator.

That's because it pulls out data from Windows Terminal's installation folder, which is locked down by Windows 10.

PowerShell 7 installed from Microsoft Store is not supported by the scripts (more details can be found in #37).

install.ps1 and uninstall.ps1 only manipulate current user's Windows Explorer settings for the context menu items, and do not write to Windows Terminal settings.

So different users on the same machine must install the context menu items separately, but possibly with different layouts.

Downloading Windows Terminal icon from GitHub (in install.ps1) requires internet connection, but in general is just an optional step that won't be executed in most cases.

More Products

To learn more about other cool products from LeXtudio Inc. , please visit our homepage.

windowsterminal-shell's People

Contributors

adrianghc avatar lextm avatar mo523 avatar slurdge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windowsterminal-shell's Issues

Mini layout entry order

While using the mini layout, the admin entry is placed on top while the standard one is below it, it should be the other way, like the other layouts.

I fixed it by replacing "AdminMini" by "MiniAdmin" in both install.ps1 and uninstall.ps1, I don't know if it's the correct way to do it, but it worked for me.

error 503

hi getting this error while installing

image

Large PNGs aren't converted to icons

I have a few shells that use custom pngs for their icons in terminal. When running the script they fail to convert to icons and throw errors instead.

InvalidArgument:
Line |
 112 |          $iconWriter.Write([byte]$width);
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot convert value "285" to type "System.Byte". Error: "Value was either too large or too small for an unsigned byte."

(Happens on line 114 as well, same issue. Though why generate the icon twice)

I saw the script casts the width/height to a byte and my pngs were > 255. After resizing and rerunning the script it created them no problem. I guess it needs to resize them first or add a warning in the readme.

Thanks for such a great script 👍

Terminal does not open in correct folder when folder name contains brackets

When using the context menu, Windows Terminal here will default to C:\WINDOWS\System32\WindowsPowerShell\v1.0 if the folder names contains [].

Steps to reproduce:

  • Install Windows Terminal via Microsoft Store
  • Use install script with mini parameter
  • Create new folder called []
  • Open folder
  • Shift + click in Windows Explorer and select Windows Terminal here

Expected:

  • Opens terminal in current folder

Result:

  • Opens terminal in C:\WINDOWS\System32\WindowsPowerShell\v1.0

[idea] Only show items in extended (shift + right-click) context menu

Could there be an option to only show the context menu items in the "extended" context menu (which appears with shift + right-click)? This is what the Powershell and WSL context menu items do.

This could be done by simply adding a string named "Extended" in the new MenuTerminal and MenuTerminalAdmin registry entries, as pictured:

image

Preview flag doesnt work properly

.\install.ps1 -PreRelease
Use Default layout.
Found Windows Terminal version 1.0.1401.0.
Found Windows Terminal version 1.6.10571.0.
Found Windows Terminal version 1.6.10412.0.
Found Windows Terminal version 1.7.572.0.
Found actual executable C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.7.572.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe.
WARNING: Didn't find icon for profile .
CreateMenuItem: D:\Downloads\install.ps1:371
Line |
 371 |          CreateMenuItem $rootKey $name $profileIcon $command $false
     |                                  ~~~~~
     | Cannot bind argument to parameter 'name' because it is an empty string.

CreateMenuItem: D:\Downloads\install.ps1:372
Line |
 372 |          CreateMenuItem $rootKeyElevated $name $profileIcon $elevated  …
     |                                          ~~~~~
     | Cannot bind argument to parameter 'name' because it is an empty string.

Windows Terminal installed to Windows Explorer context menu.

It only gave me options for the normal build along with erroring

install.ps1 doesn't work if you're logged in a non admin account

I tried to run the install script on my work computer, where I'm not the admin and it doesn't work.

I logged in to my account, opened ps7 as admin (of course an admin put his password) and ran the script but it looked for windows terminal in the user directory of the aforementioned admin so it couldn't find wt.exe.
I tried to edit the script putting the right path in $executable and $file and the script runs til the end, however the registry and the context menu are not modified.

I don't know if this is intended or unfixable, but I thought it was worth reporting it here.

Thanks

Crash on install.

image

PS C:\Users\andui\source\repos\Others\windowsterminal-shell> .\uninstall.ps1
PS C:\Users\andui\source\repos\Others\windowsterminal-shell> .\install.ps1
Found actual executable C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.11.1121.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
WARNING: Didn't find icon for profile Bash .
Add-Type : Cannot find path 'C:\Users\andui\source\repos\Others\windowsterminal-shell\System.Windows.Forms.dll' because it does not exist.
At C:\Users\andui\source\repos\Others\windowsterminal-shell\install.ps1:25 char:9
+         Add-Type -AssemblyName System.Windows.Forms, System.Drawing
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (C:\Users\andui\sour\u2026m.Windows.Forms.dll:String) [Add-Type], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot find path 'C:\Users\andui\source\repos\Others\windowsterminal-shell\System.Windows.Forms.dll' because it does not exist.
At C:\Users\andui\source\repos\Others\windowsterminal-shell\install.ps1:25 char:9
+         Add-Type -AssemblyName System.Windows.Forms, System.Drawing
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (C:\Users\andui\sour\u2026m.Windows.Forms.dll:String) [Add-Type], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.AddTypeCommand

Add-Type : Cannot find path 'C:\Users\andui\source\repos\Others\windowsterminal-shell\System.Windows.Forms.dll' because it does not exist.
At C:\Users\andui\source\repos\Others\windowsterminal-shell\install.ps1:25 char:9
+         Add-Type -AssemblyName System.Windows.Forms, System.Drawing
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (C:\Users\andui\sour\u2026m.Windows.Forms.dll:String) [Add-Type], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.AddTypeCommand

Can not work

.\install.ps1 mini
Use mini layout.
Write-Error: D:\Repo\MyConfig-main\Windows_Terminal\Open_Windows_Terminal_Here-master\src\install.ps1:389
Line |
389 | $folder = GetProgramFilesFolder $includePreview
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Failed to find Windows Terminal actual folder under C:\Program Files\WindowsApps. To install menu
| items for Windows Terminal Preview, run with "-Prerelease" switch Exit.

What about non-admin (standard user) ?

Hello,
The script works well for admin user, but it fails with non-admin user. It writes some errors and creates the context items but they are non-functional. Running the script as admin, installs the context menu items but for admin only.

Could you make it work for non-admin user as well ?
@lextm

[Bug] None of the icons were found

When I tried to run the installer it worked but none of the icons were found and implemented.
This is the log from the install:

PS C:\Users\Arno> C:\Users\Arno\Desktop\install.ps1
Use default layout.
WARNING: Didn't find actual executable C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.10.761.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe so download icon from GitHub.
Invoke-WebRequest: C:\Users\Arno\Desktop\install.ps1:116
Line |
 116 |          Invoke-WebRequest -UseBasicParsing "https://raw.githubusercon …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Could not find a part of the path 'C:\Users\Arno\AppData\Local\Microsoft\WindowsApps\Cache\wt.ico'.

WARNING: Didn't find icon for profile Windows PowerShell .
WARNING: Didn't find icon for profile cmd .
WARNING: Didn't find icon for profile Ubuntu .
WARNING: Didn't find icon for profile Azure Cloud Shell .
Windows Terminal installed to Windows Explorer context menu.

Apart from the icons everything else did indeed work as intended.

I did notice that the folder it was looking in, C:\Users\Arno\AppData\Local\Microsoft\WindowsApps\Cache\wt.ico, did exist but without the \Cache\ folder and nowhere any icons to be found.

Also the directory \Microsoft.WindowsTerminal_0.10.761.0_x64__8wekyb3d8bbwe\ was incorrect mine was named \Microsoft.WindowsTerminal_8wekyb3d8bbwe\, so perhaps the use of a wildcard could be implemented?

So to fix these icons do i need to download them and put them in the mentioned \Cache\ folder and reinstall? Or is there another way to fix this?

Thanks in advance.

It doesn't like custom profiles?

I'm having trouble updating my context menu again as I've added a few new profiles and removed unused ones since last running install.ps1 a few months ago

I ran uninstall.ps1 to remove all the current entries (which were Cmd, powershell 7, azure, and powershell) then ran the install again, which completed without errors:

PS C:\Users\Aaron\Desktop> .\install.ps1
Use Default layout.
Found Windows Terminal version 1.10.2383.0.
Found Windows Terminal version 1.10.2714.0.
Found actual executable C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.10.2714.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe.
WARNING: Didn't find icon for profile SSH Router.
Windows Terminal installed to Windows Explorer context menu.

However the context menu looks like this
sAFcqGU5SP
:
uho0Dthxwp

Terminal version is 1.10.2714.0 (Store) and powershell is 7.1.4

It doesn't seem to like either of my OpenSSH profiles, or the custom Aperture Science themed command prompt profile, I have tested them one by one by removing each profile in settings.json to test this and the context menu messes up in the same way.

Here's the profiles section of settings.json if you want to reproduce this (apologies for the formatting, github doesn't want to insert line breaks):

"list": [
    {
        "commandline": "powershell.exe",
        "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
        "hidden": true,
        "name": "Windows PowerShell"
    },
    {
        "acrylicOpacity": 0.5,
        "colorScheme": "Matrix",
        "commandline": "cmd.exe",
        "experimental.retroTerminalEffect": false,
        "font": {
            "face": "Consolas",
            "size": 11
        },
        "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
        "hidden": false,
        "name": "Command Prompt",
        "useAcrylic": false
    },
    {
        "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
        "hidden": true,
        "name": "Azure Cloud Shell",
        "source": "Windows.Terminal.Azure"
    },
    {
        "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
        "hidden": false,
        "name": "PowerShell 7",
        "source": "Windows.Terminal.PowershellCore"
    },
    {
        "antialiasingMode": "grayscale",
        "commandline": "ssh root@redacted -p redacted",
        "cursorShape": "underscore",
        "experimental.retroTerminalEffect": false,
        "icon": "ms-appdata:///roaming/icons/raspberry.png",
        "name": "SSH DietPi",
        "snapOnInput": false,
        "suppressApplicationTitle": true,
        "tabTitle": "DietPi SSH"
    },
    {
        "commandline": "ssh root@redacted -p redacted",
        "name": "SSH Router",
        "suppressApplicationTitle": true,
        "tabTitle": "SSH Router"
    },
    {
        "acrylicOpacity": 0.5,
        "backgroundImage": "ms-appdata:///roaming/p2terminalbg.gif",
        "backgroundImageAlignment": "center",
        "backgroundImageOpacity": 0.5,
        "backgroundImageStretchMode": "fill",
        "colorScheme": "Aperture",
        "cursorColor": "#A66900",
        "cursorShape": "vintage",
        "experimental.retroTerminalEffect": true,
        "font": {
            "face": "Cascadia Mono"
        },
        "hidden": false,
        "icon": "ms-appdata:///roaming/aperture_transparent.png",
        "name": "Aperture",
        "padding": "45, 34, 24, 24",
        "tabTitle": "Aperture Science",
        "useAcrylic": true
    }
]

Cannot open terminal via 'Windows Terminal Here as Administrator'

After running the installation script I get the context menu. It works fine if I use 'Windows Terminal Here' for cmd, pwsh, etc. But when I want to open the terminal as administrator via 'Windows Terminal Here as Administrator', the powershell window and cmd window just flash on my screen and then nothing happens.

I have check the registry for the running command as follows:

\HKEY_CLASSES_ROOT\Directory\ContextMenus\AddMenuTerminalAdmin\shell{0caa0dad-35be-5f56-a8ff-afceeeaa6101}\command

PowerShell -WindowStyle Hidden -Command "Start-Process cmd.exe -WindowStyle Hidden -Verb RunAs -ArgumentList "/c C:\Users\Kwan Hwaitzit\AppData\Local\Microsoft\WindowsApps\wt.exe -p ""命令提示符"" -d ""%V.""" "

Does it matter if there are spaces in my username? I tried to run the command directly with 'Windows Run' but got the same result.

Running uninstall.ps1 does not remove the explorer options after running uninstall.ps1

But running Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/lextm/windowsterminal-shell/master/uninstall.ps1')) uninstalled it no problem.

Did I do something wrong? I created a text file, dumped the contents from uninstall.ps1, and converted the filename from New Text Document.txt to uninstall.ps1 and tried to run that in an elevated Powershell 7 terminal.

Registry bug

I have an issue with the script that I can't seem to figure out. The short version of it is that the script successfully creates the necessary registry keys, but no shell entries are created and the keys don't show up in the Registry Editor.

I checked that the keys aren't created under Wow6432node (as they would if they were created in a 32-bit application) and that Powershell is running in 64-bit (which it is):

PS C:\Users\Avalerion\Desktop> [Environment]::Is64BitProcess
True

The interesting thing is that when I use the following command, PowerShell retrieves the correct value:

PS C:\> Get-ItemProperty -Path "HKCU:\SOFTWARE\Classes\Directory\shell\MenuTerminal" | Select-Object -ExpandProperty MUIVerb
Windows Terminal here

And yet, they key doesn't show up in the Registry Editor:
Screenshot 2020-10-08 040014

I also used the Registry Editor's search function to search for the keys, but didn't find a match.
Anybody have an idea what might be going on here?

[Feature request] Run with... on certain filetypes

I don't even know if this is possible but maybe a feature that adds a 'Run with' in the context menu on certain filetypes.

For example if I right-click on a python script and run it in Powershell that it automatically enters the command and runs ith with the relevant program.
Or even just puts in the command so you can add extra args yourself?

I'm no powershell master but I don't think it would be that hard compared to what you already have (I really have no idea).

.webp format not supported anymore

In my last version of the script (about 11 days ago or something) I used a .webp image for my python icon and it worked flawlessly, but now I get an error
image
This is probably a handling in icon images you've added but since I haven had any problems with random formats and sizes I don't understand the change.

Support customized Windows terminal profile.

Hi, in my configuration file I have 4 profiles.

image

My settings:

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile": "{11a66a21-0c86-4522-aa0d-415cce5f172c}",
    "profiles": {
        "defaults": {

        },
        "list": [
            {
                "guid": "{11a66a21-0c86-4522-aa0d-415cce5f172c}",
                "name": "Bash",
                "colorScheme": "Ubuntu",
                "fontFace": "Cascadia Code",
                "fontSize": 12,
                "commandline": "bash.exe",
                "icon": "ms-appx:///ProfileIcons/{574e775e-4f2a-5b96-ac1e-a2962a402336}.png",
                "hidden": false,
                "acrylicOpacity": 0.8,
                "useAcrylic": true
            },
            {
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            },
            {
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "cmd",
                "commandline": "cmd.exe",
                "hidden": false
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            }
        ]
    },
    "keybindings": [
        { "command": "paste", "keys": "ctrl+v" }
    ]
}

So how can I start the Windows terminal here with the default profile instead of selecting from CMD and PowerShell?

Wrong Order Of profiles

hi everyone i have setup few profiles which appears ok inside the terminal

image

but when i run the script all appears to be misorder please can someone help

image

Unable to install

ParserError: D:\Download\install.ps1:322
Line |
 322 |          <svg class="octicon octicon-sign-out v-align-middle" viewBox= …
     |                      ~~~~~~~
     | Unexpected token 'octicon' in expression or statement.

Fails to find icon for wsl (Ubuntu)

Not sure about other WSL distributions, but at least for my Ubuntu profile, your script fails to find the icon for it. Just a minor annoyance, simple enough to fix in the regedit myself, but just thought I'd point that out. Additionally, I had removed Azure from my profiles on windows terminal (no point in having it in there if I don't use azure), but your script still adds it to the context menu, even though having removed the default powershell 5 from windows terminal profiles made it not go to the context menus. Fairly unfamiliar with the powershell scripting language so not sure if these are issues in the script or weird default bugs from windows terminal itself. Either way, figured I should point this out. All in all, great script, made my life much easier getting these to the context menus, even if there are those couple of annoyances I had to manually sort out

No Icon

Hey, I am getting no icon when right-clicking. How can I fix this?
image

Invalid JSON Primitive when installing

I run the script Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/lextm/windowsterminal-shell/master/install.ps1'))
And I get the following error:
image

The Windows Terminal option does then appear in the context menu but an error message pops up when clicking it saying there is no app associated with it.

Is it possible get shell information from setting file?

Hi. I love your script. It's really useful about my shell life with windows. I never thought without it. Although, I need a little bit more feature. I really want to use with Anaconda shell also. I have several shells like below image.

image

And I want to run anaconda shell with context menu. I try to edit your code myself. Unfortunately, It's too difficult to me. So, I have an idea if is it possible making context to menu from Terminal setting. It's really good for me.

Thanks again!!!

Elevated Process' fails as VBS does not have a ScriptEngine

When trying to start any of the Elevated Terminals using the vbs script I get an error saying:

"There is no script engine for file extension .vbs"...

I am not sure why I can't run the .vbs file - I have even followed the SO post here
https://stackoverflow.com/questions/17757248/error-there-is-no-script-engine-for-file-extension-vbs-when-using-git-bash

I also get the error if I try to execute the vbs file manually (Or any vbs file)

Is it possible to create the Elevated Command without using vbs-files?

[Bug] Unable to parse unix icon-path

The Windows Terminal is able to recognize both unix paths and escaped windows paths (C:\\Git\\etc\\etc.ico and C:/Git/etc/etc.ico) for their icon paths.
This script, however, only seems to work with the former way, i.e C:\\Git\\etc\\etc.ico.

Option to choose between Stable and Preview

Hi, thanks for the script dev.

Only one request if possible.
I have both stable and preview versions of Windows terminal installed and when I ran your script it added the stable version to the context menu. If it is possible to add Windows terminal preview build to the context menu, then please guide me.

"Mini" and "Flat" doesn't work.

Running ".\install.ps1 mini" or ".\install.ps1 flat" installs the default.

Can be fixed by removing or commenting line 395 of install.ps1

Error

Get-ChildItem:
Line |
 163 |      $versionFolders = (Get-ChildItem $root | Where-Object {
     |                         ~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'C:\Program Files (x86)\WindowsApps' because it does not exist.
GetProgramFilesFolder:
Line |
 389 |      $folder = GetProgramFilesFolder $includePreview
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Failed to find Windows Terminal actual folder under C:\Program Files (x86)\WindowsApps. To install menu items for Windows Terminal Preview, run with "-Prerelease" switch Exit.

EDIT: Using PowerShell Core 7.0.3 and Windows Terminal Preview 1.4.2652.0

error 0x80070002 on admin launch (Command Prompt)

When doing a shift + right click in a directory, going into 'Windows Terminal (Admin) here' -> Command Prompt or Windows Azure Shell, I get the following error:

[error 0x80070002 when launching `Prompt -d C:\Users\abarranco\Downloads.']

[error 0x80070002 when launching `Cloud Shell']

Powershell appears to function properly in admin though.
So does non-admin across all 3.

[Bug?] Using environment variables for icon renders it unidentifiable.

Hi! Really nice script for adding the profiles to the context menu!

I use a custom icon for my Git-Bash profile (actually don't know if it is custom, or default), but it uses an env variable (%PROGRAMFILES%).
Running the script adds the item to the context menu, but outputs the error:

WARNING: Didn't find icon for profile Git-Bash
I have the following as the icon path "icon" : "%PROGRAMFILES%\\Git\\mingw64\\share\\git\\git-for-windows.ico".

I am also getting this for my WSL profile, which doesn't use a custom icon (i.e there is no "icon" item in it's profile config).
Do you know of any reason this might be the case?

Make script open WSL2 in current windows directory

I'm using WSL2 with Ubuntu 18.04 on Windows Terminal: I was wondering if it was possible to use your script to open WSL2 in the current windows directory.
At the moment, it just opens Windows Terminal with Ubuntu in its own home folder.

Windows Powershell not opening in current folder

Like i said in the title, all command line options in windows terminal (cmd, ubuntu, powershell 7) opens correctly in the current folder. Windows Powershel did not. I'm not sure if this is a problem with your script or is Powershell's fault.

Seeking mouse might not be efficiency enough for users only prefer one shell.

image

Some users may only use one terminal. For me, I only use bash and never touch cmd or PowerShell.

But to open a terminal here, I have to seek my mouse. That is hard on a high-resolution screen.

Users types:

  • A: Only prefer one shell. Requires the best efficiency.
  • B: May switch shells. Requires a sub-menu.

I suggest there could be an option to switch. If the user prefers one default shell, there won't gonna create any submenu but only two options:

  • Open Windows Terminal here
  • Open Windows Terminal here(Admin)

And always open terminal with the default profile.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.