Introduction¶
Spending long hours writing prompts, reading conversations, and viewing code blocks in DeepSeek Harness (DSH) can cause eye strain if the interface remains on the official light theme’s stark white surfaces. Attempting to modify CSS manually often fails to override the --dsw-* design tokens: the client presenter writes these tokens as inline styles on the body, which regular stylesheets cannot override. This article introduces the community plugin dsh-eyecare-bg (Maintainer: Sorphone, Category: Fun Cosmetics). It only overrides background-related tokens, keeping text, borders, accent colors, fonts, font sizes, border radius, layout, and shadows identical to the official theme. It features a built-in settings panel registered into the DSH settings page, has zero dependencies, requires no build step, and does not modify app.asar.
What is this¶
dsh-eyecare-bg is a minimal DSH plugin that changes the background of the Web / Desktop versions of DSH to an eye-care green (or a customizable green value). On the host side, it uses webserver/index-inject to inject theme styles with !important into index.html. This overrides 31 background tokens that resolve to white in the official light theme (canvas, cards, sidebar, menus/popups, inputs, code blocks and code headers, status bars, floating buttons, etc.). On the client side, it only registers an “Eye-care Green Background” section into the official settings.section slot; it does not write to localStorage, and configuration is stored in $DSH_HOME/eyecare-bg.json.
- Directory Page: https://www.skillhub.cn/plugins/Sorphone/dsh-eyecare-bg
- Source Code: https://github.com/Sorphone/dsh-eyecare-bg
- License: MIT (see
package.jsonin the materials) - Current Material Version:
3.0.0
Why it can change the background¶
DSH interface colors rely on --dsw-* tokens. The presenter in @deepseek-ai/dsh-client-ui-layout distributes these via body.style.setProperty inside apply(snapshot). Since these are inline styles, they only lose cascade priority to author declarations with !important. This plugin hooks into webserver/index-inject on the host side to push two lines of styles into the injection table (theme token overrides + panel shell styles, deliberately separated to prevent the panel from accidentally turning off shell styles when “Surface Dyeing” is disabled) along with the panel script. Entries with kind: 'style' enter the <head>, and declarations carry !important, thereby taking precedence over the body’s inline tokens.
Core Features¶
Surface Override Coverage¶
SURFACE_TOKENS contains 31 items, with values derived from actual parsing of the official design-platform.css. In the official light theme, most of these originally resolve to white-ish surfaces like #fff or #f9fafb. Light and dark modes are interpolated separately; the same token will automatically move towards a lighter shade in dark mode. With the default base color #C7EDCC, for example:
| token | Usage | Result (Example) |
|---|---|---|
--dsw-alias-bg-base |
Main Canvas | #C7EDCC |
--dsw-alias-bg-layer-1 |
Cards | #D9F3DC |
--dsw-specific-sidebar-fill |
Sidebar | #BBDFC0 |
--dsw-alias-markdown-code-block |
Code Blocks | #B9DCBE |
--dsw-specific-input-major |
Input Boxes | #DFF5E1 |
“Surface Dyeing” can be turned off: when set to false, only the main canvas is dyed, and cards and code blocks revert to the official color scheme.
Settings Panel (Three Entries)¶
- DSH Settings Page: Settings at the bottom of the left sidebar → Navigation bar “Eye-care Green Background” (
settings.section,order: 40). - Small color block on the left edge of the page (approx.
top: 44%), click to open a centered modal. Settingtab: falsehides this, leaving only the settings page entry. http://127.0.0.1:19387/eyecare-bg: A standalone settings page. The plugin router performs loopback Host and Same-Origin validation; cross-site requests return 403.
The panel provides a color picker, hex input, four presets (Eye-care Green / Bean Paste Green / Lighter / Darker), a surface dyeing toggle, dark mode color picking, restore default, and save. Color changes offer real-time preview: via <style id="eyecare-bg-live"> and the /*eyecare-bg*/ marker in the injected styles, the theme line injected by index can be temporarily disabled, allowing narrow-scope changes without a refresh.
Configuration Priority¶
Built-in Default ← Profile’s cordis.patch.yml config ← $DSH_HOME/eyecare-bg.json. The file takes priority; after saving via the panel, the YAML will not overwrite it. “Restore Default” deletes the file and reverts to YAML. Invalid colors (e.g., color: green) will not crash the profile; apply() catches the error, falls back to the default eye-care green, and logs a hint in the host logs.
# $DSH_HOME/profiles/desktop/cordis.patch.yml snippet example
- id: eyecare-bg
config:
color: "#C7EDCC" # Light mode background (#rgb / #rrggbb)
colorDark: "#0F2116" # Dark mode background
surfaces: true # false = only dye main canvas
tab: true # false = do not show left floating tab
Other common greens: #CCE8CF, #E3F0E4, #B7E3BE.
HTTP Interface (Local Webserver)¶
| Method | Path | Description |
|---|---|---|
| GET | /eyecare-bg/api/config |
{ ok, config, css } |
| POST | /eyecare-bg/api/config |
Save / preview: true trial / reset: true restore default |
| GET | /eyecare-bg |
Settings page |
| GET | /eyecare-bg/panel.js |
Panel module |
Request body limit is 64 KiB; invalid colors return 400.
Installation and Activation¶
The Desktop desktop profile cannot be managed by the external standard dsh CLI; it will report profile "desktop" is managed exclusively by the Electron application. Only accepted methods are: In-app Plugin Management or the CLI bundled with the installation package.
Method A · In-app: Left Sidebar → Plugins → Add Plugin → Paste the absolute path of this repository on your disk.
Method B · Bundled CLI (Replace <DSH Install Directory> with the actual local path):
& '<DSH Install Directory>\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop add `
'<Absolute path of this repository>'
It mounts into the profile’s node_modules via link: (junction). After modifying host.js, simply restart the Desktop version; no reinstallation is needed.
Rollback:
& '<DSH Install Directory>\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop remove dsh-eyecare-bg
Install/uninstall is isolated from other bundles: a single resolution failure only enters skippedBundles, while others load normally.
Typical Usage¶
- Install and restart DSH using the methods above.
- Open Settings → Eye-care Green Background, select a preset or enter a value like
#C7EDCC, and adjust the dark mode color and “Surface Dyeing” if necessary. - Click save; the configuration is written to
$DSH_HOME/eyecare-bg.jsonand persists across restarts. - If you do not want the left floating tab, set
tab: falsein YAML or JSON, or accesshttp://127.0.0.1:19387/eyecare-bgin a browser to adjust parameters independently.
Developers can run self-checks in the repository root directory (from the source materials):
node test/verify.mjs
node test/serve.mjs 19488
Suitable Scenarios and Notes¶
Suitable for: Developers who want to reduce the刺激 (stimulus/strain) of a white background during long DSH sessions but do not want to switch to a whole new theme or alter the layout. Suitable for users who need a unified green hierarchy across code blocks, sidebars, inputs, and canvas.
Notes:
- The plugin runs under the permissions of the current DSH process. Before installation, you should read the source code and the MIT license yourself to confirm you accept the behavior of style injection and local HTTP routing.
- The local webserver has no global authentication. Although the plugin implements Host/Origin restrictions for routes like
/eyecare-bg, it is still recommended to use it only in trusted local environments. - The community directory SkillHub and the GitHub repository are maintained by the community and have no official affiliation with DeepSeek / High-Flyer. The DSH ecosystem philosophy is “Everything is a Plugin”; the facts in this article are derived from the aforementioned README and
package.jsondescriptions.
Conclusion¶
dsh-eyecare-bg uses 31 background token overrides and three entries (Settings Page / Floating Tab / Standalone Page) to change DSH to eye-care green without touching the official typography and layout. It has zero dependencies, requires no build step, and stores configuration clearly on disk. For details and preview images, see the GitHub README; to enter from the directory page, see the SkillHub Plugin Page.