Bothered to open WSL everytime?
Adding Vim to Context Menu
Deleting Vim from Context Menu
Adding Emacs to Context Menu
WSL Context Menu Manager utilizes Windows' context menu for Linux tools with the ease of use. Although Windows specifies that file performance across the Windows and Linux operating systems is faster with WSL 1, some may still want to achieve that usability with WSL 2.
- Opening all files
- Opening current directory
- Custom icons in the context menu
- GUI application support for WSL 2
- Environment variables support
- Custom launch arguments
- You can clone repository to your local and begin to use. There you can compile
.cpp
files inbin
folder yourself if you want. - You can also get clean version by clicking here!
Before adding any tool to your context menu, decide where to put WSL Context Menu Manager. Don't change the directory name or location without deleting all the tools. You can always manually delete though.
- Run
add_to_context_menu.bat
. - It will ask for admin privileges to manage registries in the system from Command Prompt. You'll be able to view context of last added registry. You can check the general content of constructed register in the screenshot down below.
- Answer the questions appropriately.
The idea behind this, take the launch command user gave and append launch path with a blank space at the end. Creating a generic script for all the tools is hard. My assumption is, tools are capable of undestanding the string all alone at the end of launch command.
If your tool doesn't understand the path at the end, you may need to use a specific command line option. Use that option at the end of your launch command. Leave its value empty because launch path will be appended to end of your launch command.
You can always go to the scripts
folder and edit the script of your tool manually to meet your needs.
If you use a X Server for your app, you need to answer with y
. Otherwise it shouldn't matter.
Possible Adding Scenario
General Content of Constructed Register
- Run
delete_from_context_menu.bat
. - It will ask for admin privileges to manage registries in the system from Command Prompt.
- Answer the questions appropriately.
Answer to the first question What is the app name you want to delete?:
should be identical to the first word of launch command you wrote while adding to context menu.
Possible Deleting Scenario
- Put your
.ico
file toicons
folder in this way:XXX.ico
. XXX is the name of the app you are going to give while adding that app to context menu. XXX must be identical with your answer. - You must do this before adding to context menu.
- Sometimes if you replace your new
.ico
file with the existed name, Windows shows the old icon. You need to run this codeie4uinit.exe -show
or you can restart your computer.
WSL doesn't see your exported variables within the outer terminal. Which means you can't launch your app in Linux with the command line arguments, as you normally do in Linux if you exported some variable for it, while starting WSL.
If you export something to launch, then follow these instructions.
- Open
Edit environment variables for your account
in Windows.
- If you're exporting your variable to your
PATH
variable,- Add an environment variable named
WSLPATH
to Windows. - Set its value to what you want to export in Linux.
- If you want to export multiple values to your
PATH
, seperate them with:
.
- Add an environment variable named
- If you're exporting a variable,
- Add an environment variable named
WSLEXPORT
. - Set its value to what you want to export in Linux.
- If you want to export multiple values to your
PATH
, seperate them with
- Add an environment variable named
Environment Variables