Step 1
Install chere
.
Step 2
Execute in Cygwin:
chere -i -t mintty -s bash -f
It adds an item to the File Explorer's context menu:
Step 3
I delete the HKEY_CLASSES_ROOT\Directory\shell\cygwin64_bash
branch from Windows Registry because I never open a console by right-clicking on a folder icon: I always click on a folder window's background instead.
Step 4
Open the HKEY_CLASSES_ROOT\Directory\Background\shell\cygwin64_bash
branch of Windows Registry.
Replace «&Bash Prompt Here» with «cygwin»:
Now the Cygwin's menu item looks like this:
Step 5
Set HKEY_CLASSES_ROOT\Directory\Background\shell\cygwin64_bash\command
to:
C:\tools\cygwin\bin\mintty.exe -t cygwin -e /bin/xhere /bin/bash.exe "%V"
Step 6
Now I will add an icon to the menu item (similar to cmd
and PowerShell 7).
Add the «Icon» key with the «C:\tools\cygwin\bin\mintty.exe» value (actually, I do not use Mintty, i just use its icon):