Back to marketplace

DSH-Wallpaper-Engine

UI & Experience

mhwww/DSH-Wallpaper-Engine

Background image plugin for DeepSeek Harness: built-in defaults, custom upload, Wallpaper Engine workshop one-click apply, video wallpaper ffmpeg frame extraction.

  • deepseek-harness
  • dsh-background
  • dsh-plugin
  • electron-free
  • wallpaper-engine
GitHub Stars
2GitHub
Views
2DSH Plugin Hub
Forks
0GitHub
Open issues
0GitHub Issues
Manifest version
0.1.0dsh-wallpaper-engine
Latest push
Aug 30, 2026GitHub
License
NOASSERTIONJavaScript
Plugin type
Host + ClientRuns in both Host and Web Client

Verification and compatibility

This section shows evidence collected by the catalog. Undeclared information is labeled as unknown.

Static checked
01Exact source: github · dsh-wallpaper-engine@0.1.002Validated: Aug 26, 202603Verified Harness: 0.1.0-rc.7
Current-version compatibility
Verified on the catalog Harness version
Declared Harness range
Not declared
Declared platforms
Not declared
Profiles
web
Build approval
Unknown
Permissions
Not declared
External services
Not declared
Telemetry
Unknown
No known risk flags found

This is not a security endorsement. Review source, permissions, and configuration before installing.

View evidence and scope

Verification covers only the named source, version, and Harness environment. It does not guarantee future compatibility.

  • github:mhwww/DSH-Wallpaper-Engine#82b5e6b72ce4af94fc97c8ab26c4596221fcdf14
  • The manifest and static structure passed checks; a runtime load check has not completed.

README

View source

DSH-Wallpaper-Engine

DeepSeek Harness(dsh) Web UI 的自定义背景图片插件——联动 Wallpaper Engine,一键把 Steam 创意工坊壁纸设为 dsh 自定义背景;也支持本地图床与内置默认背景。

  • Wallpaper Engine 集成:自动发现 Steam 创意工坊目录(注册表 + libraryfolders.vdf,也支持手动绑定),在设置卡片里浏览全部壁纸缩略图,点一下即设为 DSH 背景;高清优先级:scene 壁纸解包 scene.pkg 取原生 4K 贴图 → video 壁纸 ffmpeg 抽原生帧 → Steam CDN 作者原图 → 本地预览(image 类型直接用原图;高清结果全部缓存,二次应用秒开)
  • 内置默认背景:插件自带一张渐变图(assets/default-bg.png),“恢复默认背景”一键切回
  • 自定义上传:点“选择图片…”从电脑选图立即应用,或直接填本机绝对路径
  • 明暗主题自动适配(浅色叠白遮罩、深色叠黑遮罩),遮罩不透明度可调,侧边栏可选择透出背景

浏览器端(任何打开 dsh web 的浏览器)与 DSH 桌面壳共用同一插件。

工作原理

  • Host 半边(lib/index.js):注册 bg-image settings namespace(持久化到 ~/.dsh/settings.yaml),并在 webserver 上挂三条路由:
    • GET /dsh-bg/image —— 按 imagePath 读本地图片流式返回(按扩展名设置 content-type)
    • GET/POST /dsh-bg/config —— 读取/整段写入本插件的配置(POST 经 schemastery schema 校验后落盘)
    • POST /dsh-bg/upload?name=<文件名> —— 接收图片字节(≤20MB,扩展名白名单校验),存到 ~/.dsh/bg-image/backgrounds/<安全文件名> 并自动设为当前背景
    • GET /dsh-bg/wallpapers —— 枚举 Wallpaper Engine 创意工坊壁纸(自动发现或用配置的 workshopPath;读各文件夹 project.json 的标题/类型/预览,标注当前生效项)
    • GET /dsh-bg/wallpaper-file?id=<工坊ID>&kind=preview|bg —— 安全地提供壁纸预览/背景文件(解析结果必须落在工坊目录内,防路径穿越)
    • POST /dsh-bg/wallpaper-apply {id} —— 一键把某壁纸设为背景(保留透明度等其他设置)

imagePath 留空即使用内置默认背景;host 侧动态解析插件包内 assets/default-bg.png 的路径。

  • 浏览器半边(lib/client.js,window.__ModuleLoader__.load 自包含 bundle):
    • 启动时 fetch 配置,调用官方主题 API ctx.theme.overrideTokens() 把 --dsw-alias-bg-base 覆盖成 linear-gradient(遮罩), url(图片) center/cover,--dsw-specific-sidebar-fill 覆盖为透明;深浅色各自一对值,随主题切换自动重渲染
    • 在 settings.plugin.item 槽位注册配置卡片(React,平台模块表里的 react,无额外依赖):
      • 选择图片…:隐藏 <input type="file"> 触发系统文件对话框;选中后先用 URL.createObjectURL 即时预览,再把文件字节 POST 到 /dsh-bg/upload,host 保存并自动更新配置,背景立即生效
      • 路径输入框、透明度滑杆、两个开关走「保存」按钮(POST /dsh-bg/config)
    • 图片 URL 带 nonce 破缓存;窗口重新获得焦点时自动重拉配置

为什么不用官方 settingsScope?

dsh 的 wire 面 settings.describe 对浏览器只暴露硬编码白名单的 namespace(ui-theme、agent-loop 等,见 dsh-host-apiproxy 源码注释——插件自暴露是 deferred work),第三方 namespace 读不到。所以本插件经自己的 /dsh-bg/config 路由传输配置,与 client-modules 服务 bundle 的做法同理。

配置字段

字段类型默认说明
enabledboolfalse总开关
imagePathstring""本地图片绝对路径(png/jpg/webp/gif/bmp/avif)
opacitynumber0.35遮罩不透明度 0–0.9;深色模式自动 +0.15
sidebarTransparentbooltrue侧边栏填充透明,透出背景

安装(一键)

dsh plugin --profile web add github:mhwww/DSH-Wallpaper-Engine

重启 dsh --profile web 后,设置页 →「插件」里即可配置。升级:dsh plugin --profile web update dsh-wallpaper-engine。

需要已安装 dsh 和 pnpm(corepack enable pnpm)。从 git 安装时 pnpm 会自动解析依赖(@deepseek-ai/dsh-settings、schemastery 均在 npm 公开仓库)。

高清增强均为可选,缺失时自动回退低清预览:

  • scene 壁纸原生 4K 素材:RePKG(放到 ~/.dsh/bin/RePKG.exe,或用 REPKG_BIN 环境变量指定路径),应用时自动解包 scene.pkg 取像素量最大的贴图
  • 视频壁纸原生帧:系统 PATH 里有 ffmpeg
  • scene/web 壁纸 Steam 原图:无额外依赖(自动经代理链访问 Steam 公开 API)

Steam 创意工坊目录自动发现依赖 Windows 注册表(其他平台请用卡片里的手动绑定)。

网络说明(国内用户)

github: 依赖安装时,pnpm 会先用自己的 HTTPS 探测解析 commit(读的是 npm/pnpm 代理配置,不读 git 的),再回退到 git ls-remote(读 git 自己的代理配置)。因此:

  • 直连不稳的网络下,安装开头可能出现 2 行 ETIMEDOUT 重试警告——最终仍会成功(git 步骤通常可通);个别失败重跑一次命令即可
  • 想彻底避免警告,任选其一配好代理:
    pnpm config set proxy      http://127.0.0.1:7897   # 换成你的代理端口
    pnpm config set https-proxy http://127.0.0.1:7897
    # 或只给 git 配(pnpm 探测仍会警告,但克隆不受影响):
    # git config --global http.https://github.com.proxy http://127.0.0.1:7897
    

开发安装(本仓库克隆后)

dsh plugin --profile web add <本仓库路径> --registry=https://registry.npmmirror.com
cd <本仓库路径> && pnpm install        # link: 安装下依赖在源码目录解析
dsh --profile web                      # 重启服务生效

dsh plugin add 会自动把包加进 profile 的 dsh.profile.bundles(本包带 dsh.bundle 声明与自带的 cordis.patch.yml,无需手工编辑组合层)。link: 方式安装时,修改 lib/ 下的代码重启服务即生效。

卸载

dsh plugin --profile web remove dsh-wallpaper-engine

已知边界

  • 卡片文案当前为中文硬编码(locale 字典已预留)
  • 直接编辑 settings.yaml 中的 bg-image 段后,切回浏览器窗口会自动生效(focus 时重拉)
  • 图片路径填错时预览隐藏、背景不应用,不会影响 dsh 本体

License

MIT

Comments

0
Newest first