dsh-glass-opaque-fix: Restore opaque background for third-party overlays in the Liquid Glass theme

Preface

When both the Liquid Glass Wallpaper theme (dsh-plugin-wallpaper-engine) and third-party plugins that rely on host background aliases are enabled in DeepSeek Harness (DSH), dialogs and floating layers often become semi-transparent, making text hard to read against the wallpaper. The affected plugins usually have no standalone toggle, so disabling the wallpaper or settling for reduced readability becomes the only way out. dsh-glass-opaque-fix takes a third position—inside your own independent plugin—using a copy-pasteable CSS recipe to pull the backgrounds of specified floating layers back to opaque, without touching the theme or the source code of the affected plugins.

What This Is

dsh-glass-opaque-fix is published by maintainer 1015677515 and categorized as a fun-theme compatibility patch. The repository describes its purpose as: restoring the opaque backgrounds of floating-layer panels that the Liquid Glass theme (dsh-plugin-wallpaper-engine) has made semi-transparent; it ships with one verified recipe (the dsh-cost-meter cost detail dialog) and documents how to add selectors for other plugins. The license is MIT, and the current package.json version is 1.0.0. The project notes that AI agents on DeepSeek Harness participated in development.

Community directory page: skillhub.cn/plugins/1015677515/dsh-glass-opaque-fix. This directory is a community site with no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem has always been “everything is a plugin,” and this repository is a user-side installable compatibility layer rather than a built-in host capability.

Where the Problem Comes From

The Liquid Glass theme, through rules under body[data-we-glass-page], remaps the host aliases

--dsw-alias-bg-layer-1
--dsw-alias-bg-layer-2
--dsw-alias-bg-layer-3

into semi-transparent films composed with color-mix(…, transparent), letting the wallpaper show through from beneath—this is the theme’s intended design. But this is a global change: any plugin that paints its background using these aliases becomes translucent too, regardless of whether it has anything to do with wallpaper.

The README tested two common workarounds, both unsatisfactory:

  1. The theme’s “Floating Glass · Glass Opacity” option only covers selectors like we--prefixed elements or officially installed registry panels, and does not reach third-party [role=dialog] floating layers; moreover, in wallpaper-engine 1.3.3, the glassAlpha slider corresponds to an alpha floor of about 0.25, so it cannot be adjusted to fully opaque.
  2. Injecting CSS into the theme bundle gets overwritten on theme updates (e.g., 1.3.2 → 1.3.3); injecting it into the affected plugin’s files gets lost when that plugin updates.

Therefore, an independent small plugin that only modifies the RECIPES in its own client.js is the approach deemed sustainable by the documentation.

Core Functionality

This plugin injects styles on the client side, forcing opaque backgrounds for the selectors listed in RECIPES, and removes the styles via ctx.effect on unload; when there are no recipes, it does not inject an empty <style>. If document or ctx.effect is unavailable, it exits quietly to avoid dragging down the entire client load.

Background expression (prioritizing harmony with the theme’s panel color):

background: var(--we-panel-color, var(--dsw-static-neutral-bluish-00, #ffffff)) !important;

Key principles: don’t use var(--dsw-alias-bg-layer-*) (which the theme has already rewritten); instead use --dsw-static-neutral-bluish-* or --we-panel-color, which the theme doesn’t assign; !important is required to override the body[data-we-glass-page] scope; if the floating layer has separate head/body child nodes, the child selectors must be included as well.

Recipes currently included in the repository:

Plugin Floating Layer Selectors Verification
dsh-cost-meter Cost detail dialog .cm-stat-dialog and its head/body child elements Marked as actually used in the README (1.8.32)

Installation and Activation

The installation method in the documentation is to link the dependency as a local directory in your profile and add it to the bundle; there is no dsh plugin add github:… command. Please read the repository source and the MIT license yourself before installing; plugins run with the current process’s permissions inside the DSH client, so you should only install code you trust.

  1. Place the repository in any directory on your machine (do not use undocumented steps other than git clone in place of your existing copy-management workflow for this procedure).
  2. Add the dependency and bundle in the profile’s package.json:
{
  "dependencies": {
    "dsh-glass-opaque-fix": "link:A:/your-path/dsh-glass-opaque-fix"
  },
  "dsh": {
    "profile": {
      "bundles": [
        "dsh-glass-opaque-fix"
      ]
    }
  }
}
  1. Create a directory link under profile/node_modules/ (Windows example):
mklink /J "C:\Users\<you>\.dsh\profiles\desktop\node_modules\dsh-glass-opaque-fix" "A:\your-path\dsh-glass-opaque-fix"
  1. Restart DSH.

Environment requirements: a DSH version capable of loading dsh.client plugins; the glass theme is optional—when the theme isn’t installed, the rules will still be injected, but the base color is already opaque, so there is usually no visible change. No third-party dependencies, no build step.

If you only want to fix a single plugin and don’t want to install this package: you can copy the same CSS snippet into an existing plugin or any stylesheet that gets loaded, following the instructions below. The trade-off is that you may need to manually maintain it again after the theme or the affected plugin updates.

Typical Usage: Adding a Recipe for Another Plugin

The whole process only modifies the RECIPES array at the top of client.js; you must restart DSH after the change (client.js is loaded at startup).

  1. Open the semi-transparent floating window.
  2. DevTools → Elements → select the floating window and read the class of the outermost panel.
  3. Add a new entry in RECIPES, for example:
const RECIPES = [
  {
    id: 'cost-meter',
    plugin: 'dsh-cost-meter',
    note: 'Cost detail dialog. Verified on 1.8.32.',
    selectors: [
      '.cm-stat-dialog',
      '.cm-stat-dialog .cm-stat-dialog-head',
      '.cm-stat-dialog .cm-stat-dialog-body',
    ],
  },
  // {
  //   id: 'some-plugin',
  //   plugin: 'dsh-some-plugin',
  //   note: 'Settings dialog; selectors taken from DevTools.',
  //   selectors: ['.some-dialog'],
  // },
];
  1. Restart DSH and check whether the floating window no longer lets the wallpaper show through; if the header or body is still translucent, add the child element selectors to selectors.

When debugging a failure to take effect, check in the README’s order: whether style[data-plugin-css="dsh-glass-opaque-fix"] exists; whether document.querySelectorAll('.your-selector').length is ≥ 1; and in Computed, whether background-color is still being overridden by a higher-priority rule.

Applicable Scenarios and Caveats

Who it’s for: users or plugin authors who have enabled dsh-plugin-wallpaper-engine (or a similar liquid-glass effect) and find that a third-party floating layer has become semi-transparent due to host background aliases, affecting readability; people willing to use DevTools to confirm selectors and maintain RECIPES.

Boundaries (excerpted from the repository description):

  • It only handles background; borders, shadows, and text that are still affected by the glass effect require separate rules.
  • It does not do a global [role=dialog] catch-all, to avoid covering panels that the theme itself intends to glassify, such as the theme’s settings window or the wallpaper repository.
  • If the fixed plugin renames its classes, the recipe becomes invalid and the selectors must be re-captured.
  • When contributing new recipes, only modify RECIPES; the note must state the floating layer’s purpose and the verified plugin version; solutions that write the patch into the theme or the affected plugin’s files are not accepted.

Closing

The value of dsh-glass-opaque-fix lies in converging the collision between “the theme’s global semi-transparency” and “third-party UIs written with opaque aliases” into a single, version-controllable recipe table: change one selector, restart, and verify—without depending on the release cadence of wallpaper-engine or the affected plugins.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye