给你的Vscode加一个毛玻璃特效

环境

macOS:10.15 VScode:1.4 --- ## 问题描述 在macos下想给vscode加一个酷炫的毛玻璃效果,参考了炫酷的VS Code毛玻璃效果,但是实际操作中css文件并没有生效。 --- ## 问题解决 起哦一开始以为是mac恶心的权限问题,然后尝试给vscode权限,但是没有用。 然后我去看了git上原作者的说明:https://github.com/Microsoft/vscode/issues/32257 >Sorry. This method has failed after the vscode v1.36 update. The reason is that a black background color has been added to the window. And the Electron's setBackgroundColor() method has some bugs on the MacOS. I can't dynamically change the background color in the script. Now you can only modify the vscode source to enable the vibrant effect.

hi guys. I have some good news. The old way has failed after the vscode v1.36 update. I changed the custom.js file: w = nodeRequire('electron') .remote .getCurrentWindow(); w.setBackgroundColor('#00000000'); w.setVibrancy('ultra-dark'); w.setFullScreen(true); Don't forget to execute the command "Reload Custom CSS and JS". with automatic full screen vscode, the problem has been fixed. You can turn off full screen manually.

于是首先我尝试降级到1.5之前,事实上成功了。 然后我采取作者的说法,尝试修改.js文件,但是又不行了,vscode在1.3.7之后又有新的问题。 巧合的是我看到作者其实好像是个中国人,并且开发了一个vscode拓展。。。。 这TM就很尴尬,拓展一装就完事了,我其实定制化需求也不是很大

vibrancy

Note

此插件在windows下同样适用,并且可以自行去作者git上看说明。