用一张 PNG 替换 DeepSeek Harness 的应用图标——托盘、关于面板、桌面与开始菜单快捷方式、窗口、任务栏、资源管理器条目,以及可执行文件内的图标资源——换前备份原文件、换前校验打补丁后的可执行文件,并可一条命令恢复官方图标。
安装
# Release 预构建包
dsh plugin --profile web add -w "https://github.com/MicroCapCap/dsh-icon-studio/releases/download/v1.1.2/dsh-icon-studio-1.1.2.tgz"
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:MicroCapCap/dsh-icon-studio
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Give DeepSeek Harness your own icon. One PNG in, every surface out:
| Surface | Source it comes from | What the plugin does |
|---|---|---|
| Tray icon ("hidden bar") | resources/tray.ico |
writes a fresh multi-size ICO |
| About panel icon | resources/icon.png |
writes a 512 px PNG |
| Desktop / Start Menu shortcuts | .lnk IconLocation |
retargets every shortcut that launches the exe |
| Window, taskbar, alt-tab, Explorer file icon | icon resources inside DeepSeek Harness.exe |
patches RT_GROUP_ICON + RT_ICON with the Win32 resource API |
Use it
Two ways in, one operation behind both.
Settings page. Open Settings → DSH 图标 (the section appears under the regular settings navigation). Drop or pick a PNG, the panel builds all sizes and shows the preview strip, then 应用 writes them. 还原默认 puts the originals back. Nothing is written until you press 应用.
Agent tools. Ask the agent, e.g. "use D:\art\my-logo.png as the DSH icon". It calls:
dsh_icon_apply— build + apply (image, optionaltargets,background)dsh_icon_status— what is applied right nowdsh_icon_restore— put the originals back
The settings page talks to the Host half over loopback-only routes:
| Route | Purpose |
|---|---|
GET /api/dsh-icon-studio/status |
installation, executable hash, signature, applied icon |
POST /api/dsh-icon-studio/build |
store an uploaded PNG ({name, data} base64) and render the icon set |
POST /api/dsh-icon-studio/apply |
apply a built icon ({slug}) to tray, shortcuts and executable |
POST /api/dsh-icon-studio/restore |
restore the recorded originals |
GET /api/dsh-icon-studio/preview?slug= |
the preview contact sheet as PNG bytes |
Every route is registered with auth: 'required', so a host with the
token-provider admission authenticates it before the handler runs; on older
hosts the handler still applies connection.requestRejection when that service
exists. It then rejects non-loopback callers, cross-site sec-fetch-site, and a
mismatched Origin, so a web page cannot drive it.
The tray icon and the window/taskbar icon are independent: changing one never changes the other.
What it guarantees
- Backup first. The original
tray.ico,icon.png, executable and shortcutIconLocationvalues are copied under%LOCALAPPDATA%\DSH-IconStudio\originals\before anything is replaced. - Verify before swap. The patched executable is checked (icon group size and frame count) and started once in Electron's node mode; on failure the binary is left untouched.
- Rename, never overwrite. Windows allows renaming but not overwriting the image of a running process, so the live executable is renamed aside and the patched one is copied in. A leftover that is still mapped is hidden, and the plugin deletes it the next time it starts.
- Idempotent. When the live executable is already this plugin's build, the next patch is built from the recorded vendor binary instead of stacking a second icon group on top, so repeated applies produce the same bytes.
- Transparent background. Existing transparency is kept; otherwise a white background is removed with a soft alpha ramp so anti-aliased edges and interior cut-outs stay clean.
- Every size. 16, 24, 32, 48, 64, 128 px as 32-bit DIB and 256 px as PNG.
Requirements
- Windows. The engine is
scripts/iconstudio.pyand uses only the Python standard library (ctypes,zlib), so any Python 3.8+ works — the DSH runtime Python is discovered automatically. - PNG input, 8-bit, non-interlaced.
Notes
- Patching the executable changes its bytes; the Authenticode signature no longer
matches afterwards. That is expected for a self-restyled binary, and
dsh_icon_restore(or a DSH update) brings the signed original back. - A DSH update replaces the executable, so re-run
dsh_icon_applyafter one. The tray icon and shortcuts survive an update only if the updater leavesresources\and the.lnkfiles alone;dsh_icon_statusshows what is live. - Each apply keeps its source image as
source.pngnext to the generated set, so an icon can be rebuilt or re-applied from the plugin's own folder. - Everything the plugin writes lives in
%LOCALAPPDATA%\DSH-IconStudio\; delete that folder afterdsh_icon_restoreto reclaim the backup space.
Tests
Run with the bundled Node runtime (electron --expose-internals --check works
for syntax checks):
| Test | Covers |
|---|---|
node tests/engine.mjs |
Host module shape + engine selftest (7 frames, all sizes) |
node tests/routes.mjs |
The five settings-page routes: fence, validation, status, build from an uploaded PNG, preview bytes |
node tests/client.mjs |
The client module wrapper: settings-section registration and a render pass with a stub React |
License
MIT. See LICENSE.
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-task-board★ 10645
侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。
zhu1090093659/dsh-web#packages/dsh-web-all★ 10645
DSH Web UI 插件与皮肤合集:任务看板、git 图、右侧面板、远程移动端 UI、桌宠、实时 token 统计与皮肤中心。
ccch1mneyyy/dsh-TUI★ 8283
Claude Code 风格全屏终端 UI:像素鲸鱼顶栏、实时工作状态行、思考流式展开。
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7472
右下角常驻的小鲸鱼挂件:余额、今日已用与每轮对话消耗(含峰谷价),余额预警与今日预算的泡泡内容都可编辑;泡泡点击序列模块化自定义,支持并列加权 A/B、随机台词与随机图片;内置 30+ 厂商模板(OpenAI / OpenRouter / Kimi / 硅基流动 / 方舟 / 智谱 / MiniMax 等),按模型查余额与订阅额度;另有任务结束音效、导入音频、自定义角色与资源管理。数据全在本机,无遥测。
omdsh-dev/DSH-better-sidebar★ 5336
侧边栏完整工作台:内置文件渲染编辑、终端、Git 与子代理,支持三方插件注册新 Tab。
omdsh-dev/dsh-genui★ 1060
助手回复内渲染交互式 UI 组件:布局、图表、表单、测验、mermaid、3D 场景与回传事件循环。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。