Skip to content

Commit

Permalink
adapt new configuration setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mintty committed Nov 18, 2016
1 parent c3c54a3 commit c820364
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 19 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Run the [installer](https://github.com/mintty/wsltty/releases) to install
* wsltty package components (see below) in the user’s application folder (where WSL is also installed)
* an empty wsltty “home directory” to enable storage of a mintty config file
* Start Menu and Desktop shortcuts to start a WSL bash (with some variations, see below)
* optional context menu entries for Windows Explorer to start a WSL bash in the respective folder, installable from the Start Menu subfolder
* optional context menu entries for Windows Explorer to start a WSL bash in the respective folder
* install/uninstall context menu items from Start Menu subfolder
* `wsl*.bat` scripts to invoke wsltty manually (with some variations and invocation options, see below)
* an uninstall script that can be invoked manually to remove shortcuts and context menu entries

Expand Down
Binary file added add to context menu.lnk
Binary file not shown.
24 changes: 22 additions & 2 deletions add to context menu.bat → config-context-menu.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
@echo off

rem See comments in install.bat about changing the installation directory.

set installdir=%LOCALAPPDATA%\wsltty

rem Explorer context menu

if "%1"=="/U" goto remove
if "%1"=="/u" goto remove


:add
rem add to Explorer context menu

set userdirname=HKEY_CURRENT_USER\Software\Classes\Directory\shell
set userdirpane=HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell

Expand Down Expand Up @@ -36,4 +42,18 @@ reg add "%userdirpane%\wsltty" /d "%label% %here%" /f
reg add "%userdirpane%\wsltty" /v Icon /d "%icon%" /f
reg add "%userdirpane%\wsltty\command" /d "%target0%" /f

goto end


:remove
rem remove from Explorer context menu

rem delete Explorer context menu
set userdirname=HKEY_CURRENT_USER\Software\Classes\Directory\shell
set userdirpane=HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell

reg delete "%userdirname%\wsltty" /f
reg delete "%userdirpane%\wsltty" /f


:end
8 changes: 5 additions & 3 deletions makewinx.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ FILE11="wsl~.bat"
FILE12="wsl-l.bat"
FILE13="install.bat"
FILE14="uninstall.bat"
FILE15="add to context menu.bat"
FILE16="remove from context menu.bat"
FILE17="wsltty home & help.url"
FILE15="config-context-menu.bat"
FILE16="add to context menu.lnk"
FILE17="remove from context menu.lnk"
FILE18="wsltty home & help.url"

[SourceFiles]
SourceFiles0=.
Expand All @@ -73,4 +74,5 @@ SourceFiles0=.
%FILE15%=
%FILE16%=
%FILE17%=
%FILE18%=

12 changes: 0 additions & 12 deletions remove from context menu.bat

This file was deleted.

Binary file added remove from context menu.lnk
Binary file not shown.
2 changes: 1 addition & 1 deletion uninstall.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ del "%USERPROFILE%\Desktop\WSL Bash ~ in Mintty.lnk"

:explorer context menu

call "%installdir%\remove from context menu.bat"
call "%installdir%\config-context-menu.bat" /U


:undeploy
Expand Down

0 comments on commit c820364

Please sign in to comment.