conda / conda

A system-level, binary package and environment manager running on all major operating systems and platforms.
https://docs.conda.io/projects/conda/
Other
6.48k stars 1.69k forks source link

Installation of Conda/MiniConda should configure Windows Terminal #14198

Open MovGP0 opened 3 months ago

MovGP0 commented 3 months ago

Checklist

What is the idea?

When installing Conda/Miniconda on Windows, there should be the option to register the Conda PowerShell and Conda CMD within the Windows Terminal.

Why is this needed?

This would ease the access to the Conda terminals, rather than doing the required settings manually or needing to search the terminals from the start menu.

What should happen?

The user should be asked if she wants the Conda/Minoconda shells registered in the Windows Terminal. If the user agrees, the following settings should be made to Windows Terminal settings file:

Location:

%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json

Additional entries:

{
    "_comment": "other properties removed for conciseness",

    "profiles":
    {
        "list":
        [
            {
                "_comment": "other list entries removed for conciseness"
            },
            {
                "commandline": "%windir%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy ByPass -NoExit -Command \"& '%AppData%\\Local\\miniconda3\\shell\\condabin\\conda-hook.ps1' ; conda activate '%AppData%\\Local\\miniconda3' \"",
                "guid": "{0443b667-6bec-4622-87bd-e8376b6cb73e}",
                "hidden": false,
                "icon": "%AppData%\\Local\\miniconda3\\Menu\\anaconda_powershell_console.ico",
                "name": "Anaconda PowerShell",
                "startingDirectory": "%HOMEPATH%"
            },
            {
                "commandline": "%windir%\\System32\\cmd.exe \"/K\" %AppData%\\Local\\miniconda3\\Scripts\\activate.bat %AppData%\\Local\\miniconda3",
                "guid": "{53186e05-9a39-43e2-9b66-c550881c5d73}",
                "hidden": false,
                "icon": "%AppData%\\Local\\miniconda3\\Menu\\anaconda_console.ico",
                "name": "Anaconda CMD",
                "startingDirectory": "%HOMEPATH%"
            },

Additional Context

No response

travishathaway commented 2 months ago

@marcoesters or @jaimergp, is this an issue better suited for constructor?

jaimergp commented 2 months ago

I think @marcoesters was working on this for the menuinst shorcuts. I think this is the feedstock: https://github.com/AnacondaRecipes/console_shortcut-feedstock

marcoesters commented 2 months ago

Yes, I am working on it. This will hopefully be included in the Miniconda 24.9.x release and Anaconda Distribution 2024.10.