You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extension actually uses an executable (from wait-registry.c) to efficiently watch for a registry change -- that hacky batch file would only get used as a fallback if the user deleted the executable!
Thanks for the matchMedia tip -- unfortunately, VS Code doesn't seem to expose the underlying DOM/Window to extensions, so I don't think I've got access to the underlying 'window' object to call matchMedia on.
I would expect them to provide a proper event for this at some point, or even just implement this functionality natively!
As for the function, yeah I found out that Extensions cannot see the DOM or Electron APIs. There is now talk of adding the APIs for extensions. So subscribe to the discussion I linked to find out when it will be available. :-)
I'll close this issue for now, as nothing can be done just yet -- but I'll keep an eye out for updates in this area. Although I expect the functionality will just make its way into VS Code and we won't need this extension at all in the long run!
Hey man, nice work on the extension. But the
.bat
file and registry reading are ugly hacks that are no longer necessary. :-)Read the bottom of this comment:
microsoft/vscode#61519 (comment)
There is a JavaScript query, supported by V8/Electron (VSCode's GUI engine), which tells you whether dark mode is enabled or disabled on the system.
So you can rip out all the ugly code and replace it with this. :-)
The text was updated successfully, but these errors were encountered: