Preface¶
The DeepSeek Harness plugin ecosystem allows users to extend functionality. The default interface style is fixed, and long-term use can easily lead to visual fatigue. dsh-bg-switcher focuses on solving the background switching problem, allowing users to use preset or custom images to quickly adjust the interface atmosphere.
What It Is¶
This is a plugin for DeepSeek Harness, maintained by Bainianzzz. It transforms the area above the “Settings” button at the bottom of the sidebar into a “Background” entry point. Users can choose from 6 preset color cards or enter a custom image URL to fill the window with a background and save their selection.
Core Features¶
The plugin registers its entry point in the sidebar.footer.action slot.
Since the button expands to approximately 220px and collapses to 56px, limited by the sidebar width, it cannot directly expand a panel in its original position. Therefore, the selection panel is a position:fixed overlay that is positioned to the right of the sidebar after measuring the button’s position, and automatically repositions when the window is resized.
The background image is drawn directly on the html tag. --dsw-alias-bg-base is set to transparent via ctx.theme.overrideTokens, and after the underlying layer becomes transparent, an overlay layer keeps the foreground opaque. Separate overlay layers are configured for light and dark modes, with the dark mode overlay controlled by html:has(body[data-ds-dark-theme]).
The selection is stored in localStorage (dsh.bg-switcher.selection) and remains unaffected by plugin reinstallation or upgrades.
Installation and Activation¶
Use the plugin_manager tool to install:
安装 DSH 插件 https://github.com/Bainianzzz/dsh-bg-switcher:
1. 克隆仓库到 ~/dsh-plugins/dsh-bg-switcher;
2. plugin_manager 工具,action=install_bundle,target 填该目录绝对路径;
3. 确认 application 为 applied,否则把 warnings 与 error 报给我;
4. cordis_inspect_query 查客户端 sidebar.footer.action 插槽,确认出现 id 为 bg-switcher 的条目。
After installation, select the plugin in the sidebar and click to activate it.
Typical Usage¶
- Find the “Background” button at the bottom of the sidebar (located above the “Settings” button).
- Click the button, then choose from 6 preset color cards or paste a custom image URL.
- The window background will immediately fill the space and remember your selection.
Technical Details¶
- Rendering order: The shell renders this slot first, then renders
sidebar.settings, so the button appears above “Settings”. - Cleanup mechanism: Style tags and token layers are created within
ctx.effectwith a cleanup function returned, reverting to the theme defaults upon deactivation. - Theme adaptation: Light and dark overlay layers ensure foreground content remains readable across different themes.
References¶
- Plugin Directory: https://www.skillhub.cn/plugins/Bainianzzz/dsh-bg-switcher
- GitHub Repository: https://github.com/Bainianzzz/dsh-bg-switcher