Default Profile for Common Profile Settings #3254

Closed
opened 2026-01-30 23:16:58 +00:00 by claunia · 15 comments
Owner

Originally created by @damianpowell on GitHub (Aug 7, 2019).

Originally assigned to: @zadjii-msft on GitHub.

Default Profile for Common Profile Settings

Allow settings which the user would like applied to all profiles to be specified in a profile with a well-known name, such as "name" : "_default". All settings in this profile will be applied before they are overridden from individual profiles. This would be helpful to allow all profiles to have acrylic applied with a certain opacity where those settings are not specified.

[snip]
{
    "name" : "_default",
    "useAcrylic" : true,
    "acrylicOpacity" : 0.5,
    "closeOnExit" : true,
    "colorScheme" : "Campbell",
    "cursorColor" : "#FFFFFF",
    "cursorShape" : "bar",
    "fontFace" : "Consolas",
    "fontSize" : 10,
    "historySize" : 9001,
    "padding" : "0, 0, 0, 0",
    "snapOnInput" : true,
    "startingDirectory" : "%USERPROFILE%"
},
{
    "name" : "PowerShell Core",
    "commandline" : "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
    "guid" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "icon" : "ms-appx:///ProfileIcons/{574e775e-4f2a-5b96-ac1e-a2962a402336}.png",
},
{
    "name" : "cmd",
    "commandline" : "cmd.exe",
    "guid" : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
    "icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
    "useAcrylic" : false
},
[snip]
Originally created by @damianpowell on GitHub (Aug 7, 2019). Originally assigned to: @zadjii-msft on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Default Profile for Common Profile Settings Allow settings which the user would like applied to all profiles to be specified in a profile with a well-known name, such as `"name" : "_default"`. All settings in this profile will be applied before they are overridden from individual profiles. This would be helpful to allow all profiles to have acrylic applied with a certain opacity where those settings are not specified. [snip] { "name" : "_default", "useAcrylic" : true, "acrylicOpacity" : 0.5, "closeOnExit" : true, "colorScheme" : "Campbell", "cursorColor" : "#FFFFFF", "cursorShape" : "bar", "fontFace" : "Consolas", "fontSize" : 10, "historySize" : 9001, "padding" : "0, 0, 0, 0", "snapOnInput" : true, "startingDirectory" : "%USERPROFILE%" }, { "name" : "PowerShell Core", "commandline" : "C:\\Program Files\\PowerShell\\6\\pwsh.exe", "guid" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "icon" : "ms-appx:///ProfileIcons/{574e775e-4f2a-5b96-ac1e-a2962a402336}.png", }, { "name" : "cmd", "commandline" : "cmd.exe", "guid" : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png", "useAcrylic" : false }, [snip]
claunia added the Resolution-Fix-CommittedArea-SettingsIssue-TaskProduct-Terminal labels 2026-01-30 23:16:58 +00:00
Author
Owner

@mcpiroman commented on GitHub (Aug 7, 2019):

Sounds like subset of https://github.com/microsoft/terminal/pull/1258#issuecomment-506776011

@mcpiroman commented on GitHub (Aug 7, 2019): Sounds like subset of https://github.com/microsoft/terminal/pull/1258#issuecomment-506776011
Author
Owner

@carlos-zamora commented on GitHub (Aug 7, 2019):

Tagging @zadjii-msft for ideas regarding Cascading Settings.

Personally, I think that the current spec covers this functionality in a cleaner way, but @zadjii-msft might catch something I'm missing here. :)

@carlos-zamora commented on GitHub (Aug 7, 2019): Tagging @zadjii-msft for ideas regarding Cascading Settings. Personally, I think that the current spec covers this functionality in a cleaner way, but @zadjii-msft might catch something I'm missing here. :)
Author
Owner

@zadjii-msft commented on GitHub (Aug 8, 2019):

So I'm gonna leave this open (unless there's another issue we've got already tracking this bit).

This is one of the things I refer to in the #1258 spec, but I specifically don't cover to try and keep that spec as atomic as possible. I absolutely want to be able to include a default profile to the settings that's used as the prototype for all the other profiles you might have.

This is probably something that'll be spec'd up once #754 is more ironed out.

@zadjii-msft commented on GitHub (Aug 8, 2019): So I'm gonna leave this open (unless there's another issue we've got already tracking this bit). This is one of the things I refer to in the #1258 spec, but I specifically don't cover to try and keep that spec as atomic as possible. I absolutely want to be able to include a `default profile` to the settings that's used as the prototype for all the other profiles you might have. This is probably something that'll be spec'd up once #754 is more ironed out.
Author
Owner

@DHowett-MSFT commented on GitHub (Sep 17, 2019):

@zadjii-msft this probably only needs a very light spec, if one at all. Proposal to change type to Issue-Task?

@DHowett-MSFT commented on GitHub (Sep 17, 2019): @zadjii-msft this probably only needs a very light spec, if one at all. Proposal to change type to `Issue-Task`?
Author
Owner

@zadjii-msft commented on GitHub (Sep 17, 2019):

Done. I might just skip the spec tbh. I'll prototype and feel out if it really needs the spec, I think we all understand what we want from this feature.

@zadjii-msft commented on GitHub (Sep 17, 2019): Done. I might just skip the spec tbh. I'll prototype and feel out if it really needs the spec, I think we all understand what we want from this feature.
Author
Owner

@zadjii-msft commented on GitHub (Oct 2, 2019):

Let's have a discussion: Where should these settings be layered?

For defaults, dynamic profiles, should these "global default" settings be applied:

  1. _immediately after the Profile is constructed (so that settings from defaults.json and dynamic profile generators) should override them?
  2. Or after settings from defaults.json and dynamic profile generators are applied? (this feels wrong to me)
  3. Should it be after defaults.json but before DPGs?
  • Settings from dynamic profiles layer on top of "global default" settings, but "global default" settings override things from defaults.json

@microsoft/windows-console-team thoughts?


Hypothetical settings:


{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "defaultSettings": 
    {
        "padding" : "2",
        "useAcrylic" : true,
        "fontFace" : "Cascadia Code",
        "icon" : "myIcon.png"
    },
    "profiles":
    [
        {
            // Make changes here to the powershell.exe profile
            "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
            "name": "Windows PowerShell",
            "commandline": "powershell.exe",
            "hidden": false
        },
        {
            // Make changes here to the cmd.exe profile
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",
            "hidden": false
        },
        {
            "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
            "hidden": false,
            "name": "Ubuntu-18.04",
            // recall that the WSL DPG sets the icon to the tux png.
            "source": "Windows.Terminal.Wsl"
        },
    ],

    "schemes": [],
    "keybindings": []
}

If we do 1, then "useAcrylic" would have no affect on the powershell, cmd default profiles, since they set "useAcrylic" themselves. Same with the padding value.

If we do 2, then the icon we set in the defaults will blow away the default cmd, powershell icons, as well as the icons set by the DPGs we currently have. However, the useAcrylic, padding settings apply correctly.

If we do 3, then the icon for the DPG still works, since it gets applied after the global defaults, but the icon for cmd, powershell is still overridden.

@zadjii-msft commented on GitHub (Oct 2, 2019): Let's have a discussion: Where should these settings be layered? For defaults, dynamic profiles, should these "global default" settings be applied: 1. _immediately after the _Profile_ is constructed (so that settings from `defaults.json` and dynamic profile generators) should override them? 2. Or after settings from `defaults.json` and dynamic profile generators are applied? (this feels wrong to me) 3. Should it be after `defaults.json` but before DPGs? - Settings from dynamic profiles layer on top of "global default" settings, but "global default" settings override things from `defaults.json` @microsoft/windows-console-team thoughts? <hr> Hypothetical settings: ```js { "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "defaultSettings": { "padding" : "2", "useAcrylic" : true, "fontFace" : "Cascadia Code", "icon" : "myIcon.png" }, "profiles": [ { // Make changes here to the powershell.exe profile "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe", "hidden": false }, { // Make changes here to the cmd.exe profile "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "name": "cmd", "commandline": "cmd.exe", "hidden": false }, { "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", "hidden": false, "name": "Ubuntu-18.04", // recall that the WSL DPG sets the icon to the tux png. "source": "Windows.Terminal.Wsl" }, ], "schemes": [], "keybindings": [] } ``` If we do 1, then `"useAcrylic"` would have no affect on the powershell, cmd default profiles, since they set `"useAcrylic"` themselves. Same with the `padding` value. If we do 2, then the `icon` we set in the defaults will blow away the default cmd, powershell icons, as well as the icons set by the DPGs we currently have. However, the `useAcrylic`, `padding` settings apply correctly. If we do 3, then the `icon` for the DPG still works, since it gets applied after the global defaults, but the icon for cmd, powershell is still overridden.
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 2, 2019):

2 feels right to me- how would the user say “I want Cascadia Code everywhere” if the Profile constructor or the Default profiles set it to Consolas? The user’s preferred defaults IMO trump any app generated data, so if they want to set a default icon it’s on them?

I can see why that would not be ideal.

To properly handle option 1 we would need to remove everything from defaults.json that is also matched by the constructor, and that reduces the absolute value of defaults.json.

@DHowett-MSFT commented on GitHub (Oct 2, 2019): 2 feels right to me- how would the user say “I want Cascadia Code everywhere” if the Profile constructor or the Default profiles set it to Consolas? The _user’s preferred defaults_ IMO trump any app generated data, so if they want to set a default icon it’s on them? I can see why that would not be ideal. To properly handle option 1 we would need to remove everything from defaults.json that is also matched by the constructor, and that reduces the absolute value of defaults.json.
Author
Owner

@miniksa commented on GitHub (Oct 3, 2019):

If you do 3, is there any way to override the icon for the DPG or is it now toast?

I think it's either 2 or 3.

@miniksa commented on GitHub (Oct 3, 2019): If you do 3, is there any way to override the icon for the DPG or is it now toast? I think it's either 2 or 3.
Author
Owner

@zadjii-msft commented on GitHub (Oct 3, 2019):

With both 2 and 3, we can still override the icon from a DPG by setting the icon within the profile manually. The other profiles in profiles.json are always applied last, so settings from those will always override default, global, or dynamically-generated properties.

@zadjii-msft commented on GitHub (Oct 3, 2019): With both 2 and 3, we can still override the icon from a DPG by setting the icon within the profile manually. The other profiles in `profiles.json` are always applied last, so settings from those will always override default, global, or dynamically-generated properties.
Author
Owner

@miniksa commented on GitHub (Oct 3, 2019):

In that case, I think if you expressly set an icon at this user-set-defaults level, it should kill the DPG icons unless you again go further and override one of the DPGs to have an icon.

So that's a 2, I believe.

@miniksa commented on GitHub (Oct 3, 2019): In that case, I think if you expressly set an icon at this user-set-defaults level, it should kill the DPG icons unless you again go further and override one of the DPGs to have an icon. So that's a 2, I believe.
Author
Owner

@zadjii-msft commented on GitHub (Oct 4, 2019):

2 it is then :)

Thanks all for the pseudo-spec review. We can debate naming in the PR, and if I run into any other issues I'll ping this thread. Though, that won't be till at least the end of the month :P

@zadjii-msft commented on GitHub (Oct 4, 2019): 2 it is then :) Thanks all for the pseudo-spec review. We can debate naming in the PR, and if I run into any other issues I'll ping this thread. Though, that won't be till at least the end of the month :P
Author
Owner

@jwhipp commented on GitHub (Oct 8, 2019):

I don't know if this is related for sure, but build 0.5.2762.0 from the store on a fresh profile resulted in a near empty settings json with only profiles information. The settings for everything else is seemingly gone.

@jwhipp commented on GitHub (Oct 8, 2019): I don't know if this is related for sure, but build 0.5.2762.0 from the store on a fresh profile resulted in a near empty settings json with only profiles information. The settings for everything else is seemingly gone.
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 9, 2019):

@jwhipp That's the point! You should give a closer read to the settings file -- it explains what to do and what you should be looking for. 😄

image

@DHowett-MSFT commented on GitHub (Oct 9, 2019): @jwhipp That's the point! You should give a closer read to the settings file -- it explains what to do and what you should be looking for. :smile: ![image](https://user-images.githubusercontent.com/14316954/66440055-84b95880-e9e6-11e9-84bb-b74d3f717c28.png)
Author
Owner

@jwhipp commented on GitHub (Oct 9, 2019):

I see... my bad. My eyes immediately started scanning for the portions I wanted to edit and I didn't even notice that comment line.

@jwhipp commented on GitHub (Oct 9, 2019): I see... my bad. My eyes immediately started scanning for the portions I wanted to edit and I didn't even notice that comment line.
Author
Owner

@ghost commented on GitHub (Jan 14, 2020):

:tada:This issue was addressed in #3892, which has now been successfully released as Windows Terminal Preview v0.8.10091.0.🎉

Handy links:

@ghost commented on GitHub (Jan 14, 2020): :tada:This issue was addressed in #3892, which has now been successfully released as `Windows Terminal Preview v0.8.10091.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.8.10091.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3254