diff --git a/scripts/wsl_start.ps1 b/scripts/wsl_start.ps1 index e8f2919..2a7f890 100644 --- a/scripts/wsl_start.ps1 +++ b/scripts/wsl_start.ps1 @@ -36,6 +36,22 @@ if($remote) { $image = $imagename } +$response = Read-Host "Do you want to bind the container home directory into a windows directory? [N/y]" + +$additionaloptions = '' +if ($response -eq 'y') { + $directory = Read-Host "Write the windows directory destination relative to WSL, for example `"/mnt/c/Users/Username/Desktop/ExampleFolder`"`n" + mkdir -Force $directory | Out-Null + $additionaloptions = "-v ${directory}:/home/designer" +} + +$response = Read-Host -Prompt "Do you want to set additional arguments for the container instantiation? [N/y]" + +if ($response -eq 'y') { + $response = Read-Host -Prompt "Write the additional arguments, for example -v :." + $additionaloptions = -join($additionaloptions, $response) +} + Write-Host "" $dockercommand = ("docker run -d " + @@ -45,6 +61,7 @@ $dockercommand = ("docker run -d " + "-e WAYLAND_DISPLAY=`$WAYLAND_DISPLAY " + "-e DISPLAY=`$DISPLAY " + "-e XDG_RUNTIME_DIR=/mnt/wslg " + + "$additionaloptions "+ $image) wsl -d Ubuntu bash -ic $dockercommand