question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[themes] Support ${preferredTheme} as theme setting

See original GitHub issue

“workbench.colorTheme” should not be in the user settings if the automatic dark-mode switch is on. Or at least it shouldn’t be changed by vscode for the user.

That file is for me to tell vscode what to do. Not for vscode to tell me what it did.

My dotfiles are changing depending on the time of day now, and that’s not the way it should be.

  • VSCode Version: 1.42.1
  • OS Version: macOS 10.15.3

Copied from about:

Version: 1.42.1
Commit: c47d83b293181d9be64f27ff093689e8e7aed054
Date: 2020-02-11T14:44:27.652Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 19.3.0

Steps to Reproduce:

  1. Make settings like:
"window.autoDetectColorScheme": true,
"workbench.preferredDarkColorTheme": "Base16 Dark Eighties",
"workbench.preferredLightColorTheme": "Base16 Light Tomorrow",
  1. Switch the dark-mode to on or off.
  2. See "workbench.colorTheme": "Base16 Light Tomorrow" appear in settings. This setting shouldn’t be there, it’s not my setting. It’s vscode’s “state”.

Does this issue occur when all extensions are disabled?: Yes

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
PeterMinincommented, Feb 23, 2022

Another problem with changing the settings automatically is that if multiple VS Code windows are open, each of them tries to apply the same change to settings.json at the same time. As a result, what I’m observing is that, at theme change, all windows but one show “Failed to save ‘settings.json’: The content of the file is newer” and open a tab for settings.json with a “modified” status.

"${preferredTheme}" seems like a good solution.

0reactions
carlossanlopcommented, Sep 16, 2021

Ah, that wasn’t clear to me. The description said “Make settings like:” which led me to think the option didn’t exist. Thanks for explaining.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Color Themes - Visual Studio Code
Color themes let you modify the colors in Visual Studio Code's user ... The active color theme is stored in your user settings...
Read more >
Theme settings - MoodleDocs
Allow user themes. If the option allowuserthemes is enabled, each user may select their preferred theme on the edit profile page.
Read more >
Managing themes - IBM
You mange themes by using the WebSphere Service Registry and Repository user ... The user theme and logon theme views are accessed in...
Read more >
Theme settings - Shopify Help Center
Customize your typography settings. Desktop; iPhone; Android. From your Shopify admin, go to Online Store > Themes. Find the ...
Read more >
Theme settings - Themes and appearance - Totara Help
Allow user themes. If enabled, each user may select their preferred theme when editing their profile. All Totara pages will be displayed in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found