Skip to content

Allow modifying the default behaviours for all windows via global user settings #2

Description

@Greenheart

Thanks for developing this extension!

Would it be possible to make use of the global settings to control the default behaviours for all windows?

I want to keep the global settings for window.title, but whenever I uncheck the Set Window Title option in the extension panel, it writes an (unwanted) default value to the window.title option in ./.vscode/settings.json.

The desired behaviour would be to just delete the window.title option from the ./.vscode/settings.json, since that would then allow the global user settings to be applied.

Proposed solution

One way to implement this would be to only write the enabled settings to ./.vscode/settings.json, and otherwise delete the key to let VS Code resolve the global user setting. Thus, respecting the user's desired default settings.

This applies for almost all settings.

Depending on if a setting is enabled either locally in ./.vscode/settings.json or the global settings.json, there are three cases:

  1. When a setting is enabled in a project, the extension should write the value to the local project settings.
  2. When a setting is disabled, delete the setting and value from ./vscode/settings.json, since that will allow the default values from global user settings to be used.
  3. When opening a folder or workspace, only write the enabled settings to ./.vscode/settings.json. Don't modify settings locally if they have been globally disabled by the user settings. For example if the global settings define "windowColor.setWindowTitle": false, the extension should respect that and not include the key windowColor.setWindowTitle (and importantly the related window.title) when writing to the local project settings ./.vscode/settings.json.

Conclusion

This would make this extension easier to use. The alternative right now is to only enable it in selected windows.

By implementing the changes proposed above, this would effectively fix #1 as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions