leavestring/awesome-dsh-background-plugin 预览 preview

leavestring/awesome-dsh-background-plugin

DSH Web 背景个性化插件:上传自己的图片(JPG / PNG / WEBP / GIF,浏览器端自动压缩到 1600px 以内)或一键切换极光、余烬、宣纸三种预设氛围;实时预览所见即所得,支持细调图像存在感、暗色遮罩、柔焦、适配方式与焦点位置;上传即自动保存到 DSH 设置,重启后原样恢复,浅色 / 深色主题均正常;侧栏、消息气泡、输入框保持原样不遮挡,浮层菜单不受影响;全程本地处理不上传任何服务器,关闭开关或一键恢复默认即可完全移除;内置中英文双语界面。

Project Overview项目介绍

This is a DSH-native background customization plugin built exclusively for DSH Web. It adds a dedicated background settings entry to DSH’s official settings panel, allowing users to either use one of three built-in preset backgrounds or upload their own custom image files. Supported input formats include JPG, PNG, WEBP, and static GIFs; all uploaded images are automatically compressed locally to 1600px maximum edge length and saved in WEBP to balance quality and file size. Settings are persistently saved to your local DSH settings file and will remain intact even after you restart DSH or your computer.

It is designed for users who want to personalize their DSH workspace instead of sticking with the default solid color background. After installation, accessing the plugin is straightforward: just navigate to Settings > General Settings > Background in the DSH Web UI. You can adjust five different parameters in real time to get the look you want: image opacity, dark mask, blur, scaling mode, and focus position. Any changes you make are previewed immediately, so you can tweak until you are happy with the result before saving. If you ever want to go back to the default look, just click the restore default button to completely remove the custom background with no leftover changes.

To install the plugin, you will need to have Node.js version 18 or higher, pnpm package manager, and an existing DSH installation already set up on your machine. There are three installation methods available: a one-click automated install script for beginners, an automated installation via your DSH Agent, and a manual installation for users who want to follow each step themselves. After the installation completes, you must fully exit the running DSH process and restart it, then force refresh your browser to clear old cache before the plugin will appear. The plugin is open source under the MIT license, and all image processing happens locally, so your images never get sent to any third-party servers.

这是一款专为 DSH Web 开发的原生背景自定义插件,支持用户上传自定义图片或选择预设氛围背景,还可对透明度、遮罩、柔焦等参数进行细粒度调整,所有设置都会持久化保存,重启 DSH 后不会丢失。它借助 DSH 官方的 Cordis 插件机制实现,在 DSH 设置面板中添加了正式的背景设置项,解决了自定义背景常见的设置回滚、图片丢失等问题。

这款插件面向想要个性化 DSH Web 工作空间、摆脱默认单调纯色背景的用户使用。安装完成后,用户只需进入 DSH 的「设置→通用设置→背景」即可开始使用。你可以直接选用预设背景,也可以上传自定义图片,参数调整过程中支持实时预览,满意后保存即可生效;不需要背景时,点击「恢复默认」就能一键完全移除,不留任何残留。

使用本插件需要提前安装 Node.js ≥ 18、pnpm 以及 DSH,安装方式支持一键脚本安装、DSH Agent 自动安装和手动安装三种。需要注意的是,安装完成后必须完全重启 DSH 进程,并强制刷新浏览器页面才能加载插件。所有图片都在本地浏览器处理存储,不会上传到第三方服务器,项目开源遵循 MIT 许可证。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:leavestring/awesome-dsh-background-plugin

把 leavestring/awesome-dsh-background-plugin 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

DSH Background

DSH Background

为 DSH Desktop(桌面端) 与 DSH Web 提供可上传图片 / 预设氛围的背景设置插件,设置持久化,重启不丢失。

简体中文 | English

Listed on DSH Directory Release v0.2.2 License: MIT Node.js DSH Desktop DSH Web GitHub Stars


⚠️ 先看版本对应

DSH 的插件按 profile 隔离:装在 web 里的插件不会出现在桌面端,反之亦然。同时两个版本线的 DSH 内部 API 完全不同,插件也分两条版本线:

你在用 DSH 版本 该装的插件版本 目标 profile
DSH 桌面端(Windows / macOS 应用) 0.2.x 0.2.2 desktop
dsh web(新版运行时) 0.2.x 0.2.2 web
dsh web(旧版运行时) 0.1.x 0.1.9 web
  • 怎么查自己的 DSH 版本:命令行运行 dsh --version(桌面端用应用自带的 CLI,见下方「方式 B」;它会打印同一运行时的版本)。
  • 桌面端插件管理器还会校验 peer 版本,版本不匹配会直接拒绝安装并回滚,报错形如 Plugin awesome-dsh-background-plugin@0.1.9 is incompatible with dsh 0.2.0-rc.2。 看到这个就是装错版本线了,改用 0.2.2 即可。
  • 0.2.x(自 0.2.1 起)相对 0.1.9 是为 0.2.x 重写的移植版(host 侧导出 Config + volatile(),客户端改用 ctx.configForms),不向下兼容 0.1.x;0.1.x 用户请继续用 v0.1.9(见下方 Web 端安装)。

为什么需要它?

DSH 默认只有一套主题色背景。如果你和我一样,希望自己的工作空间不再千篇一律,可能已经试过:

  • 直接改主题文件 / CSS —— 不可行。DSH 是插件化架构,主题走 CSS 变量,任何更新都会覆盖你的修改;
  • 用油猴脚本 / 浏览器插件改样式 —— 侵入性强、要写选择器、还要跟着 DSH 版本走,维护成本高;
  • 放弃个性化 —— 长时间盯着单调的纯色界面,容易疲劳也缺少归属感。

这个插件通过 DSH 官方的 Cordis 插件机制,把「背景」变成设置页里的一个正式设置项,并解决了实现过程中最棘手的三个坑:

  1. 设置要能被读回 —— 设置写进去只是第一步,客户端还得真的读得到。0.1.x 受 Host 的命名空间白名单限制(插件附带 expose-namespace.mjs 一键放行);0.2.x 改成「profile 条目 id 即命名空间」,由 dsh-api-settings-controller 统一暴露,桌面端不需要任何白名单步骤。
  2. 页面容器盖住背景 —— 对话主区、详情面板、布局框架都有不透明背景。桌面端还多一层坑:Windows 桌面外壳用另一个令牌(--dsw-specific-sidebar-fill)给布局框架上色,而且 #root 与框架之间多了一层插槽根,所以子代选择器会失效。插件在背景激活时逐层让这些页面级容器透出背景,同时保留侧栏、消息气泡、输入框的原有表面。
  3. 图片上传即丢 —— 大图写设置文档慢、重启就消失。插件在浏览器端把图片压缩到 1600px / WEBP 后再写入设置,上传即自动持久化,重启后原样恢复。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev AriaAgent 下一个 Next skill-injector-plugin →