Closed ShevonKuan closed 6 months ago
Thanks for the contribution! Although I was wondering, have you considered using window.autoDetectColorScheme
instead of dark-mode-listener
as the trigger? It looks like this package is quite old, ships a binary and is macOS only, so perhaps there's a way to detect the VSCode theme change and use that to prompt the user for a reload instead.
As you said, dark-mode-listener
may not be a good idea. However I have tried some solutions, unfortunately, not of them can work. Like the property of chromium, prefers-color-scheme
. And window.autoDetectColorScheme
is just only a bool value of the vscode config file. It's hardly for me to learn how this config work from the sourcecode of vscode.
I've looked into this and found a native API to monitor dark/light mode changes, and also solved an issue where the check wouldn't work if the user's theme is different from either of the preferred themes, will merge a refactored version of your code. Thanks again!
Appreciate you recognizing my idea and refining my immature code implementation. I would like to ask you what is the way to learn about this native api method.
Refer to this issue https://github.com/illixion/vscode-vibrancy-continued/issues/51. I have added a solution to change Vibrancy preferences when the os change to dark/light mode automatically. The things you only need to do:
"window.autoDetectColorScheme" = true
insettings.json
.https://github.com/illixion/vscode-vibrancy-continued/assets/49824574/c39d4661-a3a7-470e-98bf-9ec20240eb6d
As it is my impromptu modification, it may not be in line with your code posting style and the corresponding specification, ths.