GithubHelp home page GithubHelp logo

Comments (3)

DHowett avatar DHowett commented on June 16, 2024 1

Thanks for the request!
You can sort of do this already, by using a matchProfiles entry in the new tab menu (docs).

Here's what mine looks like:

"newTabMenu": 
[
    {
        "type": "remainingProfiles"
    },
    {
        "allowEmpty": false,
        "entries": 
        [
            {
                "commandline": null,
                "name": null,
                "source": "Windows.Terminal.Wsl",
                "type": "matchProfiles"
            }
        ],
        "icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
        "inline": "never",
        "name": "WSL",
        "type": "folder"
    }
],

In brief: it's two toplevel menu items, one that says "all unclaimed profiles go in the root" and one that says "now put some WSL profiles in a folder called WSL". All WSL profiles will go into the folder, and all non-WSL profiles will go into the root.

You can minimize it down to...

"newTabMenu": [
    { "type": "remainingProfiles" },
    {
        "entries": [ { "source": "Windows.Terminal.Wsl", "type": "matchProfiles" } ],
        "name": "WSL",
        "type": "folder"
    }
],

It looks like this at runtime (for me):

Image

(The ubuntu profile doesn't report as WSL, because Canonical Ltd created a new custom entry for it - you can use as many matchProfiles entries as you need in a menu, though, to cover everything you want.)

Does that help?

from terminal.

DHowett avatar DHowett commented on June 16, 2024

FWIW, my actual new tab menu config looks like this:

Dustin's real new tab menu customization
"newTabMenu": 
[
    {
        "type": "remainingProfiles"
    },
    {
        "allowEmpty": false,
        "entries": 
        [
            {
                "commandline": null,
                "name": null,
                "source": "Windows.Terminal.PowershellCore",
                "type": "matchProfiles"
            }
        ],
        "icon": "ms-appx:///ProfileIcons/pwsh-preview.png",
        "inline": "never",
        "name": "PowerShell",
        "type": "folder"
    },
    {
        "allowEmpty": false,
        "entries": 
        [
            {
                "commandline": null,
                "name": null,
                "source": "Windows.Terminal.VisualStudio",
                "type": "matchProfiles"
            },
            {
                "profile": "{f795dd7e-af72-4ac5-befc-1676ae18cfb0}",
                "type": "profile"
            }
        ],
        "icon": "ms-appx:///ProfileIcons/pwsh-preview.png",
        "inline": "never",
        "name": "VS",
        "type": "folder"
    },
    {
        "allowEmpty": false,
        "entries": 
        [
            {
                "commandline": null,
                "name": null,
                "source": "Windows.Terminal.Wsl",
                "type": "matchProfiles"
            },
            {
                "commandline": null,
                "name": null,
                "source": "CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc",
                "type": "matchProfiles"
            }
        ],
        "icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
        "inline": "never",
        "name": "WSL",
        "type": "folder"
    }
],

Image

from terminal.

Firehawke avatar Firehawke commented on June 16, 2024

At least for now that seems to be the best option we have. Thanks.

from terminal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.