AppliedYuu/dsh-WallpaperAndCost

dsh插件,用于检查费用并更换背景

Project Overview项目介绍

This is a native DSH web plugin that combines two core features: customizable wallpaper and a usage cost tracker for DeepSeek and OpenCode Go. It comes with 8 pre-built curated gradient wallpapers, and allows users to upload their own full-resolution images or MP4/WebM videos for dynamic wallpaper. Users can crop and adjust zoom levels from 100% to 250% on custom uploads, set independent opacity levels for the left sidebar, conversation column, and right sidebar, and all settings persist across DSH restarts. It also supports extracting wallpapers from Wallpaper Engine Steam Workshop entries, with both browser-side pure JavaScript extraction and a Python script for deeper parsing.

For the usage cost feature, the plugin adds a balance button to the conversation header that shows your current DeepSeek balance, daily consumption, current session token usage, and estimated cost. It uses the official DeepSeek CNY price table with peak and off-peak breakdowns per model. It also adds a separate button for OpenCode Go that displays rolling, weekly, and monthly usage percentages, and expanding the button shows detailed progress bars and reset times for each usage window. All API credentials are resolved on the DSH host side using DSH's built-in credential system, so no keys are ever exposed to the browser.

The standalone Python extraction script for Wallpaper Engine can also be used via the command line independent of DSH, with options to list package contents or output extracted files to a specified directory. To install the plugin, you can run the DSH CLI command dsh plugin --profile web add dsh-WallpaperAndCost, or install directly from the GitHub repository by adding the github:<owner>/dsh-WallpaperAndCost reference. After installation, you will need to restart DSH for the plugin to take effect. To use the balance feature you must have a DeepSeek API key configured in DSH, Python script extraction requires Python 3 installed on your DSH host machine, and the plugin is released under the open-source MIT license.

这是一款专为DeepSeek Harness(DSH)打造的原生网页插件,整合了壁纸自定义功能与DeepSeek、OpenCode Go用量和余额查询组件。插件内置8款精心挑选的渐变壁纸,支持上传自定义图片、MP4/WebM视频作为动态壁纸,自带裁剪编辑工具,可对左右侧边栏、对话栏分别设置透明度,设置会在重启后保留。它还支持从Wallpaper Engine创意工坊提取壁纸,提供浏览器端JS无依赖解包和Python脚本两种提取方式。

壁纸提取方面,仓库自带独立的Python提取脚本,可单独通过命令行调用,支持解析PKGV和多种TEX格式包,能导出JPEG、MP4、解压DXT/RGBA纹理并转成PNG格式。用量查询组件可在对话头部显示DeepSeek余额、当日消耗、当前会话token用量与预估费用,也支持显示OpenCode Go的滚动/周/月用量及重置时间。所有凭证都由DSH宿主端读取,不会泄露到前端。

安装可通过DSH插件命令直接执行,输入dsh plugin --profile web add dsh-WallpaperAndCost即可,也可从GitHub仓库地址安装,安装后需要重启DSH生效。使用余额功能需要配置DeepSeek API密钥,如需准确的DeepSeek平台用量还需额外配置平台令牌,提取Wallpaper Engine壁纸使用Python脚本则需要环境中安装Python 3。插件采用MIT许可证开源。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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 dsh-WallpaperAndCost

把 AppliedYuu/dsh-WallpaperAndCost 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-WallpaperAndCost

A merged DSH web plugin combining wallpaper customization and the DeepSeek balance & usage widget.

Features

🎨 Wallpaper (壁纸)

  • 8 built-in curated gradients (暮色 / 深渊 / 晨曦 / 森林 / 星夜 / 暖阳 / 青空 / 石墨)
  • Upload your own images at full original resolution (no compression), stored in IndexedDB
  • 动态壁纸:上传 MP4/WebM 视频,自动静音循环播放(铺底 <video> 元素,object-fit: cover)
  • Crop editor: drag to pan + zoom (100%–250%) with a live viewport-proportional preview
  • Independent absolute opacity sliders (0–100%) for the left sidebar, the conversation column and the right sidebar — the right-sidebar slider now drives both the dsh-better-sidebar panel and DSH's official right sidebar (dsh-client-ui-sidebar-right, detected via [data-sidebar-right-panel]); the slider auto-appears whenever either sidebar is present
  • Wallpaper choice persists across restarts (localStorage + IndexedDB)
  • 创意工坊壁纸提取(服务器目录):输入 Wallpaper Engine 创意工坊条目文件夹的绝对路径(…steamapps\workshop\content\431960\<id>),由内置的 scripts/extract_scene_pkg.py 解析 scene.pkg / .tex(含 LZ4 解压、DXT/RGBA→PNG、内嵌 MP4),提取最佳壁纸供预览与下载。需要运行 DSH 的机器装有 Python 3(脚本为纯 Python,Pillow 可选)。
    • 桌面端支持「选择文件夹…」:DSH Desktop(Windows)上可直接用系统原生文件夹选择器选取条目文件夹,自动填入绝对路径,避免手输/粘贴路径出错而报"文件夹不存在"。
    • 路径自动规整 + 明确报错:路径会先去空白、剥成对引号、展开 ~,并校验是否为绝对路径;读取失败会区分「文件夹不存在」「没有权限读取该文件夹(含 Windows 受控文件夹访问拦截)」「路径不是文件夹」,不再把权限问题笼统报成"文件夹不存在"。

🔍 Wallpaper Engine 创意工坊提取脚本

  • 仓库自带独立脚本 scripts/extract_scene_pkg.py,可单独命令行使用:
    python scripts/extract_scene_pkg.py --folder <创意工坊条目文件夹> --out <输出目录>
    python scripts/extract_scene_pkg.py <https://github.com/AppliedYuu/dsh-WallpaperAndCost/blob/HEAD/scene.pkg>          # 或直接解析单个 pkg
    python scripts/extract_scene_pkg.py <https://github.com/AppliedYuu/dsh-WallpaperAndCost/blob/HEAD/scene.pkg> --list   # 只列出包内文件
    
  • 支持容器:PKGV(scene.pkg)、TEXV0005/TEXI0001/TEXB000x(.tex)。内容类型:内嵌 JPEG/MP4、DXT1/3/5→.dds(有 Pillow 转 .png)、RGBA8888/R8 裸像素→.png、其余文件原样导出。
  • 浏览器端另有无需 Python 的「从 Wallpaper 导入」入口(File System Access API 纯 JS 解包),两者互补。

💰 Balance & usage (余额与用量)

  • Balance button in the conversation header: balance, today's consumption, this session's token usage & estimated cost
  • Official DeepSeek CNY price table with peak/valley windows, per-model and per-window breakdown
  • Platform consumption (DEEPSEEK_PLATFORM_TOKEN) is read from DSH's credential store by the host (ctx.credentials.resolve), the same way DEEPSEEK_API_KEY and OPENCODE_GO_API_KEY are — no in-widget token capture
  • The DeepSeek API key never leaves the host (host-side routes only)

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

← 上一个 Prev dsh-traffic-light 下一个 Next gzhflow →