炫酷的VS Code毛玻璃效果

VS Code 開啓毛玻璃效果以及霓虹主題

效果:css

必要插件

一、Custom CSS and JS Loader

首先安裝插件:Custom CSS and JS Loaderhtml

用於自定義CSS和JSnode

二、SynthWare 84

關鍵字高亮主題、霓虹主題json

vscode 設置bash

安裝上述主題後,在 setting.json 裏面加:微信

"terminal.integrated.rendererType": "dom"
複製代碼

樣式配置

在任意位置新建兩個文件(不會移動的位置,如桌面):app

custom.cssdom

:root{
--vibrancy-dark: rgba(0,0,0,.2);
--vibrancy-light: rgba(255,255,255,.2);
}
html {
background: transparent !important;
}

.scroll-decoration {
box-shadow: none !important;
}

.minimap {
opacity: 0.6;
background-color: transparent !important;
}

.editor-container {
background: transparent !important;
}

.search-view .search-widget .input-box, .search-view .search-widget .input-box .monaco-inputbox,
.monaco-workbench>.part.editor>.content>.one-editor-silo>.container>.title .tabs-container>.tab,
.monaco-editor-background,
.monaco-editor .margin,
.monaco-workbench>.part>.content,
.monaco-workbench>.editor>.content>.one-editor-silo.editor-one,
.monaco-workbench>.part.editor>.content>.one-editor-silo>.container>.title,
.monaco-workbench>.part>.title,
.monaco-workbench,
.monaco-workbench>.part,
body {
background: transparent !important;
}

.editor-group-container>.tabs {
/* background-color: rgba(37, 37, 37,0.2) !important; */
background: transparent !important;
/* box-shadow: 0 1px 10px -2px gray; */
}

.editor-group-container>.tabs .tab {
background-color: transparent !important;
}

.editor-group-container>.tabs .tab.active * {
color: #fff !important;
background-color: transparent !important;
}

.monaco-list.settings-toc-tree .monaco-list-row.focused {
outline-color: rgb(37, 37, 37,0.6) !important;
}

.monaco-list.settings-toc-tree .monaco-list-row.selected,
.monaco-list.settings-toc-tree .monaco-list-row.focused,
.monaco-list .monaco-list-row.selected,
.monaco-list.settings-toc-tree:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) {
/* background-color: rgb(37, 37, 37,0.6) !important; */
color: #00aaee;
}

.monaco-list.settings-editor-tree .monaco-list-row {
background-color: transparent !important;
outline-color: transparent !important;
}

.monaco-inputbox {
background-color: rgba(41, 41, 41,0.2) !important;
}

.monaco-editor .selected-text {
background-color: rgba(58, 61, 65,0.6) !important;
}

.monaco-editor .focused .selected-text {
background-color: rgba(38, 79, 120,0.6) !important;
}

.monaco-editor .view-overlays .current-line {
border-color: rgba(41, 41, 41,0.2) !important;
}

.extension-editor,
.monaco-inputbox>.wrapper>.input,
.monaco-workbench>.part.editor>.content>.one-editor-silo>.container>.title .tabs-container>.tab.active,
.preferences-editor>.preferences-header,
.preferences-editor>.preferences-editors-container.side-by-side-preferences-editor .preferences-header-container,
.monaco-editor, .monaco-editor .inputarea.ime-input {
background: transparent !important;
}

.editor-group-container>.tabs .tab {
border: none !important;
}
.panel.integrated-terminal,
.panel.integrated-terminal *{
background: transparent !important;
}
複製代碼

custom.jselectron

nodeRequire('electron').remote.getCurrentWindow().setVibrancy('ultra-dark');
複製代碼

VsCode設置

在 vscode 的設置中添加以下代碼:ide

"vscode_custom_css.imports": [
    "file:///Users/MyUserName/Documents/custom.css",
    "file:///Users/MyUserName/Documents/custom.js"
],
"vscode_custom_css.policy": true
複製代碼

VsCode命令

在vscode 中執行命令(Commond+Shift+P):

Reload Custom CSS and JS
複製代碼

友情提示:這個效果只能在MacOS 上開啓實現毛玻璃,由於electron 在 Windows上不支持透明窗體。

參考 www.fairyever.com/posts/vscod…

今日寄語:

旅途中咱們或許會丟失太陽,有的人選擇繼續尋找太陽,而有的人用別的東西取代了太陽。最後,有的人仍熱活在白天,而有的人活在白夜。——《白夜行》

歡迎關注我的微信公衆號:桃李報春

相關文章
相關標籤/搜索