dsh-card-theme
DSH Web GUI theme studio with three palettes (Nord, Solarized, One Dark), per-mode customization (accent, background, foreground, translucent sidebar, contrast, background image), an optional card layout for the left/center/right shell columns, and a conversation content column width via the platform --dsh-chat-user-width variable. Publishes CSS tokens and the host config through the official webserver/index-inject rows (tapIndex fallback on older shells).
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:DaSea/dsh-card-theme說明文件
閱讀完整 README ↗Usage
Settings GUI (recommended)
After a restart, open Settings → Theme Studio:
- Preset — one-click chips: DeepSeek default / Nord / Solarized / One Dark
- Colors — color pickers for accent, background and foreground, with a "follow preset" reset
- Card layout — off / on; the left, center and right columns become rounded cards over a canvas gap
- Content width — slider 400–2400 px plus 跟随默认 / 640 / 748 / 920 / 1200 presets; sets the conversation content column's width (gutters excluded)
- Translucent sidebar — follow preset / on / off
- Background image — choose a local file (compressed automatically) or paste an image URL, then adjust the mask (0–100%), blur (0–60 px), fit and alignment; clear it to return to a plain surface
- Contrast — slider 0–100 with preset restore
Every change applies instantly and persists locally; GUI selections take priority over host config.
The
stockpreset derives no palette: color controls are disabled and only the background image (and the global card layout) can be overridden.
Config reference
| Field | Type | Description |
|---|---|---|
preset | enum | stock · nord · solarized · onedark · custom (default nord) |
cardLayout | boolean | card layout for the three shell columns (default false); also toggleable in Theme Studio |
centerContentWidth | number | conversation content column width in px, clamped 400–2400; -1 = follow the platform default (680–920 px responsive; default) |
light.accent | color | accent for light mode (primary buttons, links, …) |
light.background | color | light-mode background |
light.foreground | color | light-mode primary text |
light.translucentSidebar | enum | preset · on · off |
light.contrast | number | 0–100; -1 = keep preset value |
light.backgroundImage | string | image URL or data: URI; empty = no image |
light.backgroundImageMask | number | 0–100 theme-color coverage over the image; -1 = 70 |
light.backgroundImageBlur | number | 0–60 px blur; -1 = 0 |
light.backgroundImageSize | enum | cover · contain · auto (default cover) |
light.backgroundImagePosition | string | CSS background-position (default center) |
dark.* | — | same fields for dark mode |
Empty strings mean "keep the preset value"; unset fields are not overridden at all.
On DSH 0.2.x the web-shell creates client entries without config (create(loader, id) passes { name } only), so client.js no longer receives this block from Cordis. The host half publishes the config through the structured index-injection seam as globalThis.__DSH_THEME_PLUGIN_CONFIG__, and the client half reads it as the initial selection. (Older shells get the same payload as a #dsh-card-theme-config JSON block in index.html.) A selection saved by Theme Studio (localStorage) wins; host config is deliberately not written to localStorage, so later config edits still apply on reload until you touch the studio.
Example — merge into the serving profile's patch ($DSH_HOME/profiles/ /cordis.patch.yml):
- id: card-theme-plugin
config:
preset: nord
cardLayout: true
centerContentWidth: 960
light:
accent: '#FF6B35'
background: '#FFFAF0'
foreground: '#1A1A1A'
translucentSidebar: off
contrast: 70
backgroundImage: 'https://example.com/light.jpg'
backgroundImageMask: 72
backgroundImageBlur: 2
backgroundImageSize: cover
backgroundImagePosition: center
dark:
accent: '#FFB07A'
background: '#1A1A1A'
foreground: '#F5F5F5'
translucentSidebar: on
contrast: 70
backgroundImage: 'https://example.com/dark.jpg'
backgroundImageMask: 80
backgroundImageSize: cover
backgroundImagePosition: center bottom
Only set the fields you want to change; leave the rest blank ('' / preset / -1).
Presets
| Preset | Style | Light bg / fg / accent | Dark bg / fg / accent |
|---|---|---|---|
stock | DeepSeek default | — (no override) | — (no override) |
nord | Nord cool | #ECEFF4 / #2E3440 / #5E81AC | #2E3440 / #ECEFF4 / #88C0D0 |
solarized | Solarized | #FDF6E3 / #657B83 / #B58900 | #002B36 / #839496 / #268BD2 |
onedark | One Dark (One Light in light mode) | #FAFAFA / #383A42 / #4078F2 | #282C34 / #ABB2BF / #61AFEF |
custom uses the nord palette as its fallback base and takes every value from light.* / dark.*.
Upgrading from 0.2.x: the
codex-warmandgraphitepresets were removed in 0.3.0. Their ids are still accepted as deprecated aliases (inlocalStorageselections and host config) and resolve tonord; pick a current preset in the studio to migrate the saved selection.