Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some settings are now ignored #5535

Closed
dave-c-whitney opened this issue Apr 24, 2020 · 10 comments
Closed

some settings are now ignored #5535

dave-c-whitney opened this issue Apr 24, 2020 · 10 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@dave-c-whitney
Copy link

"initialCols": 200,
"initialRows": 65,
"initialPosition": "0,0",
"wordDelimiters" : " ()\"'-:,;<>~!@#$%^&*|+=[]{}~?\u2502",

none of these are effective any more. Window opens with defaults for size and position, and double-click-to-select is stopping at / chars, despite it not being in the list.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 24, 2020
@zadjii-msft
Copy link
Member

Thanks for the report! 0.11 introduced some breaking settings changes which is probably causing this issue for you. This is tracked by another issue on our repo - please refer to #5458 for more discussion.

/dup #5458

@ghost
Copy link

ghost commented Apr 24, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Apr 24, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 24, 2020
@dave-c-whitney
Copy link
Author

OK, I created a new file and migrated my desired settings into it. Putting my setting in defaults:

    "defaults":
    {
        // Put settings here that you want to apply to all profiles.
        "initialCols": 200,
        "initialRows": 65,
        "initialPosition": "0,0",
        "snapToGridOnResize": true,
        "historySize": 9999,
        "fontSize": 9,
        "wordDelimiters": " ()\"'-:,;<>~!@#$%^&*|+=[]{}~?\u2502"
    },

it's still ignoring the Rows,Cols,Position and wordDelimiters. It is accepting fontSize and snapToGrid.

@zadjii-msft
Copy link
Member

That's not what that post says to do

Do your settings look like this?

{
    "globals": {
        "defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
        "initialCols": 200,
        "initialRows": 65,
        "initialPosition": "0,0",
        "wordDelimiters" : " ()\"'-:,;<>~!@#$%^&*|+=[]{}~?\u2502",
        "confirmCloseAllTabs": true,
        "keybindings": [
            ...
        ]
    },
    "profiles": {
        ...
    }
}

Then change them to look like this:

{
    "defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
    "initialCols": 200,
    "initialRows": 65,
    "initialPosition": "0,0",
    "wordDelimiters" : " ()\"'-:,;<>~!@#$%^&*|+=[]{}~?\u2502",
    "confirmCloseAllTabs": true,
    "keybindings": [
        ...
    ],
    "profiles": {
        ...
    }
}

Or even better, make a backup of your settings file, and delete the contents entirely. We'll re-generate the file with some better formatting and more sane defaults, and you can copy the modifications you want back in.

@dave-c-whitney
Copy link
Author

I did delete the file (deleted - not emptied) and let Terminal recreate it. The "defaults" section I quoted from my file specifically says to put settings there I want to apply to all profiles.

@dave-c-whitney
Copy link
Author

So some things need to go in "defaults" while others need to go out in the space you mentioned. It seems arbitrary.

@wspresto
Copy link

Thanks @zadjii-msft . Apparently the "globals" JSON path was removed in a recent patch? Musta missed that release note. Anyways this solved my problem of default profile launching default settings not the profile GUID I provided.

@zadjii-msft
Copy link
Member

Okay so there are largely two types of settings:

  • Application settings: these are setting that apply to the entire application, not just a single terminal instance. showTabsInTitlebar for example - it doesn't really make sense for one profile to have this set to true and another to set this to false. This setting affects the state of the entire application window, so it's a global setting. Same with initialPosition, initialRows/initialCols - these things affect the initial state of the window regardless of which profile was created.
  • Profile settings: these are settings that apply to a single instance of a terminal. Things like the font face used by the terminal, the colors, the cursor properties, etc. Each terminal instance within the Windows Terminal window can have different properties that don't affect any of the other terminals running in other tabs or panes.

The next tricky part is that some people want to use a bunch of common settings for all their profiles. It's a pain to have to edit all of them by hand, which is why profiles.defaults exists. That allows you to set a group of common properties that's applied to all the profiles.

If you want more reading, I'd take a look at UsingJsonSettings.md. For more technical reading, see the Default Profiles Spec or even the Cascading Settings spec

@dave-c-whitney
Copy link
Author

I would expect then that historySize and wordDelimiters would belong in "defaults" as (strictly speaking) they're profile settings, not application settings, but they apparently function out at the global (application) scope. Things get fuzzy when you're talking application-scope settings and default-for-all-profiles scope - they're very nearly the same thing, except for the handful of genuine application settings which can't go in any profile settings (including "defaults").

What would help is a comment at the global scope that settings here apply to the application (such as size and position), and then the parser could pop up errors about misplaced settings (profile-level settings given at the application scope, while functional, is "wrong" - they should be in "defaults" instead).

@zadjii-msft
Copy link
Member

Okay so wordDelimiters is definitely a weird one that probably should be a profile setting, not a global one. I'm pretty sure we've got a issue lying around somewhere tracking that. historySize though is definitely already a profile setting.

We pretty recently changed the settings template to include links to some documentation that's in progress that'll help clear all this up (soontm)

ghost pushed a commit that referenced this issue Apr 27, 2020
This property was deprecated in 0.11. We probably should have also added a warning
message to help the community figure out that this property is gone and won't work
anymore.

This PR adds that warning.

* I'm not going to list the enormous number of duped threads _wait yes I am_
    * #5581
    * #5547
    * #5555
    * #5557
    * #5573 
    * #5532
    * #5527
    * #5535 
    * #5510
    * #5511
    * #5512
    * #5513
    * #5516
    * #5515
    * #5521 
    * This literally isn't even all of them 

* [x] Also mainly related to #5458
* [x] I work here
* [x] Tests added/passed
DHowett-MSFT pushed a commit that referenced this issue Apr 27, 2020
This property was deprecated in 0.11. We probably should have also added a warning
message to help the community figure out that this property is gone and won't work
anymore.

This PR adds that warning.

* I'm not going to list the enormous number of duped threads _wait yes I am_
    * #5581
    * #5547
    * #5555
    * #5557
    * #5573
    * #5532
    * #5527
    * #5535
    * #5510
    * #5511
    * #5512
    * #5513
    * #5516
    * #5515
    * #5521
    * This literally isn't even all of them

* [x] Also mainly related to #5458
* [x] I work here
* [x] Tests added/passed

(cherry picked from commit d6cae40)
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants