When DSH Desktop starts, it uses a randomly assigned port from the OS (--port 0), which causes the browser origin to change on every restart. Because localStorage is partitioned by origin, visual states such as wallpapers stored by dream-skin / liquid-glass are lost after every restart, even if they were never deleted. dsh-beauty-persist moves this visual state to a server-side JSON file, making it independent of the port. It restores the state on every page load and pushes changes back to the server when settings are adjusted in the UI.

Features

  • Persists dream-skin / liquid-glass wallpapers and themes.
  • Server-side JSON file storage, unaffected by port changes.
  • Supports animated GIF wallpapers.
  • Supports MP4 video wallpapers.
  • Full-screen Skin Center (upload, preview, apply, and delete assets).

Installation and Activation

This plugin applies to profiles that already run dsh-dream-skin and/or dsh-liquid-glass (usually the desktop profile used by DSH Desktop).

  1. Enter the desktop profile directory:
cd ~/.dsh/profiles/desktop
  1. Add the dependency (replace <owner>/<repo> with the actual repository address):
pnpm add dsh-beauty-persist@github:<owner>/<repo>
  1. Register the bundle in package.json under dsh.profile.bundles:
{
  "dsh.profile.bundles": [
    "dsh-beauty-persist"
  ]
}

After installation, you need to restart DSH Desktop to load the new bundle.

Typical Usage

After restarting DSH Desktop, no extra configuration is required. You can manage wallpapers in the following ways:

  1. Select a wallpaper or skin in the GUI settings. After selection, the state is automatically saved server-side and restored after restart.

  2. Upload files from the command line (requires a Node.js environment):

# 上传 GIF 动图壁纸
node scripts/set-gif-wallpaper.mjs "C:\path\to\my-wallpaper.gif"

# 上传 MP4 视频壁纸
node scripts/set-mp4-wallpaper.mjs "C:\path\to\my-wallpaper.mp4"
  1. Operate in the Skin Center. Open Settings → Appearance and find 🎨 Skin Center. You can upload local images/GIFs/MP4s to the asset library (~/.dsh/beauty-persist-assets/), click a thumbnail to apply it, or click ✕ to delete it.

Notes

  • Prerequisite: dsh-dream-skin or dsh-liquid-glass must already be running.
  • Environment requirement: Node.js >= 18 is required.
  • File storage locations:
  • State file: ~/.dsh/beauty-persist-state.json
  • GIF wallpaper: ~/.dsh/beauty-persist-wallpaper.gif
  • MP4 wallpaper: ~/.dsh/beauty-persist-wallpaper.mp4 (maximum 50MB)
  • Asset library: ~/.dsh/beauty-persist-assets/ (maximum 50MB)

References