conda / menuinst

Cross platform menu item installation
https://conda.github.io/menuinst/
BSD 3-Clause "New" or "Revised" License
33 stars 41 forks source link

Add Windows Terminal profile option #196

Closed marcoesters closed 1 month ago

marcoesters commented 2 months ago

Checklist

What is the idea?

The Windows Terminal app contains profiles for terminal-based applications. These are stored in a settings.json file that can be appended. The Microsoft documentation contains a few examples of dynamic profiles.

Why is this needed?

Conda packages such as the console shortcuts for Miniconda, Anaconda Distribution, and Miniforge can be opened in the Windows Terminal, but do not appear in the profile list. This would be a great convenience feature to use the tab feature of the Windows Terminal instead of having to open a new Window each time.

What should happen?

A new option should be added to allow adding Windows Terminal profiles.

Additional Context

This is currently focused on the Windows Terminal, but the schema should be updated such that it could potentially be expanded to other platforms if the profile config files have plain-text configuration files.

jypeter commented 3 weeks ago

That's nice, @marcoesters ! Just what I was looking for using Google, and not finding any nice/streamlined steps that don't involve manually editing the Terminal json config file

The trouble is that I have checked the current menuinst documentation and I have not found any obvious and easy way to add a new profile to my Windows Terminal.

Can we use something similar to what is described in menuinst Usage : python -c "from menuinst.api import install; install('path/to/menu.json')"

Thanks!

marcoesters commented 3 weeks ago

You can install it the same way, you just need to add the terminal_profile option to the Windows part of your config file. See the schema: https://conda.github.io/menuinst/reference/#menuinst._schema.Windows.terminal_profile

Be advised though that this will also create a Start Menu entry - I don't think this can be skipped yet.