dsh-acrylic
Windows 10 (Fluent) acrylic theme for the DSH Web GUI and desktop app: Win10 light/dark --dsw-* token palette, site-wide square corners, and bounded backdrop-filter acrylic on the sidebar, task board and right-hand file panel. Dual-half plugin: a browser half that injects the stylesheet at runtime (required on the desktop app, which serves its window over a custom scheme and never runs webServer.tapIndex) plus a host half for HTTP-served dsh web. 适合追求Windows 10 Fluent设计风格、喜爱半透明亚克力视觉效果的用户。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:N3kOk0/dsh-acrylicドキュメント
README 全文を読む ↗配置
配置分为两处:cordis.patch.yml 中的挂载行,以及构建期烘焙进浏览器半边的 dev/background.json。
挂载行配置
挂载行在 cordis.patch.yml 中声明。dsh web 由宿主半边实时读取;桌面应用的浏览器半边不接收加载行的 config:,需要重建 lib/client.js(见“开发”)。
- insert:
- id: dsh-acrylic
name: dsh-acrylic
config:
enabled: true
acrylic: true
panelAcrylic: true
square: true
wash: false
全部键均为可选,缺省时回退到 lib/css.js 中的 RECIPE_DEFAULTS。布尔键接受 false / 'false' / 0 / '0' 表示关闭,其余值视为开启;noiseOpacity 与 bgDim 会被截断到 0..1。
| 键 | 默认值 | 说明 |
|---|---|---|
enabled | true | false 时完全不注入样式 |
acrylic | true | 亚克力材质总开关 |
panelAcrylic | true | 面板容器的材质开关;弹出菜单由令牌驱动,不受此开关影响 |
square | true | 全站零圆角 |
wash | false | 没有背景图时,用两层径向渐变代替 |
bgImage | '' | 任意 CSS `` 值;空字符串表示不使用背景图 |
bgDim | 0.25 | 背景图上的压暗层,0..1 |
bgBlur | '0px' | 对背景图本身预先模糊;0px 表示关闭 |
bgSize / bgPosition / bgRepeat | cover / center / no-repeat | 背景图定位 |
noiseOpacity | 0.03 | 噪点强度,0..1 |
blur | 30px | 亚克力模糊半径 |
saturate | 120% | 亚克力饱和度 |
brightnessLight / brightnessDark | 100% / 100% | 默认不施加亮度倍数:在接近极值的画布上 120% / 80% 会分别钳到 255 与 25,丢掉全部背景细节 |
tintLight / tintDark | rgba(242, 242, 242, 0.35) / rgba(31, 31, 31, 0.35) | 面板填充色 |
fallbackLight / fallbackDark | rgba(242, 242, 242, 0.97) / rgba(31, 31, 31, 0.97) | 不支持 backdrop-filter 时使用的近不透明填充 |
面板的合成结果为 backdrop-filter: blur(30px) brightness(100%) saturate(120%) 加半透明填充;弹出菜单使用的令牌版本是 blur(30px) saturate(120%) 加同名色相的 0.35 填充。
背景与构建期配置
桌面应用的浏览器半边在构建期把配置写进 lib/client.js,来源是 dev/background.json。该文件还接受 bgClear(逗号分隔的选择器列表,用于追加需要置为透明的画布选择器)。scripts/set-background.mjs 会写入该文件并重建 lib/client.js,DSH 会热重载客户端包,因此在下一次刷新后即可看到结果。
### 挂载行配置
挂载行在 [`cordis.patch.yml`](https://github.com/N3kOk0/dsh-acrylic/blob/c7d129b6afa52e95c6ba1ae4773d6669551cbcc3/cordis.patch.yml) 中声明。`dsh web` 由宿主半边实时读取;桌面应用的浏览器半边不接收加载行的 `config:`,需要重建 `lib/client.js`(见“开发”)。
```yaml
- insert:
- id: dsh-acrylic
name: dsh-acrylic
config:
enabled: true
acrylic: true
panelAcrylic: true
square: true
wash: false
全部键均为可选,缺省时回退到 lib/css.js 中的 RECIPE_DEFAULTS。布尔键接受 false / 'false' / 0 / '0' 表示关闭,其余值视为开启;noiseOpacity 与 bgDim 会被截断到 0..1。
| 键 | 默认值 | 说明 |
|---|---|---|
enabled | true | false 时完全不注入样式 |
acrylic | true | 亚克力材质总开关 |
panelAcrylic | true | 面板容器的材质开关;弹出菜单由令牌驱动,不受此开关影响 |
square | true | 全站零圆角 |
wash | false | 没有背景图时,用两层径向渐变代替 |
bgImage | '' | 任意 CSS `` 值;空字符串表示不使用背景图 |
bgDim | 0.25 | 背景图上的压暗层,0..1 |
bgBlur | '0px' | 对背景图本身预先模糊;0px 表示关闭 |
bgSize / bgPosition / bgRepeat | cover / center / no-repeat | 背景图定位 |
noiseOpacity | 0.03 | 噪点强度,0..1 |
blur | 30px | 亚克力模糊半径 |
saturate | 120% | 亚克力饱和度 |
brightnessLight / brightnessDark | 100% / 100% | 默认不施加亮度倍数:在接近极值的画布上 120% / 80% 会分别钳到 255 与 25,丢掉全部背景细节 |
tintLight / tintDark | rgba(242, 242, 242, 0.35) / rgba(31, 31, 31, 0.35) | 面板填充色 |
fallbackLight / fallbackDark | rgba(242, 242, 242, 0.97) / rgba(31, 31, 31, 0.97) | 不支持 backdrop-filter 时使用的近不透明填充 |
面板的合成结果为 backdrop-filter: blur(30px) brightness(100%) saturate(120%) 加半透明填充;弹出菜单使用的令牌版本是 blur(30px) saturate(120%) 加同名色相的 0.35 填充。
背景与构建期配置
桌面应用的浏览器半边在构建期把配置写进 lib/client.js,来源是 dev/background.json。该文件还接受 bgClear(逗号分隔的选择器列表,用于追加需要置为透明的画布选择器)。scripts/set-background.mjs 会写入该文件并重建 lib/client.js,DSH 会热重载客户端包,因此在下一次刷新后即可看到结果。