dsh-plugin-lx-music: Embedded Falling Snow Lyrics and Playback Controls within the Right-Side Wallpaper Strip of DSH

Preface

When coding or having long conversations with DeepSeek Harness (DSH) on Windows, if you have LX Music (LX Music) desktop lyrics enabled, the top-most transparent floating window often blocks your view and competes for space. LX Music itself does not manage the DSH interface layout, so developers are forced to drag the lyrics window around or simply turn it off.

Below is an introduction to the community plugin dsh-plugin-lx-music (maintainer afawfawffaf): It embeds LX Music’s now-playing lyrics and control bar into the wallpaper band on the right side of the DSH conversation area. Playback and audio remain entirely handled by LX Music; the plugin only reads its open API and sends commands such as Previous / Play-Pause / Next. The plugin is categorized as a “Client” and can currently be found in the SkillHub plugin directory; source code and documentation are available in the GitHub repository (MIT, Windows only).

What is this

dsh-plugin-lx-music is a combination of a DSH Cordis host plugin and a browser client: The host side proxies the local LX Music open API (default 127.0.0.1:23330), while the browser side renders lyrics and control capsules in a fixed “slot” within DSH.

The design principles are clearly stated in the README: Do not take over playback, do not interrupt playback, do not pop up a playback bar—the song and audio are always handled by LX Music itself; this plugin only reads lyrics, sends /play /pause /skip-next /skip-prev, and coordinates the visibility of the desktop lyrics window.

When embedded mode is enabled, LX Music’s desktop lyrics window is automatically hidden to avoid duplication with the right-side embedding; this can be turned off in the settings page to restore the LX Music desktop lyrics window.

Core Features

Right-side Wallpaper Band: Lyrics + Control Capsules

A stage component lx-music-stage is registered on shell.overlay: It uses a vertical layout with control capsules (Previous / Play-Pause / Next) at the top and the current line of lyrics plus the previous and next lines below. It is visible by default. The stage and control bar share the same overlay and the same 500ms poller (deduplicated by signature), so the LX Music API is queried only once per cycle; when clicking controls, the icon is flipped optimistically locally first, and then aligned once the real status is returned.

Lyric line changes are calculated by the page based on the local clock (using the timeline returned by /lx-music/lyric and the playback anchor point) to reduce the latency of “waiting for the network to change lines”; the frame loop does not run when paused, and requestAnimationFrame stops automatically when the tab is hidden.

Input Box and Settings

Slot ID Function
conversation.input.right / lx-music “Lyrics” button on the right side of the input box: Temporarily collapse/expand embedded lyrics (when collapsed, only the capsule remains, position unchanged)
settings.section / lx-music Settings page: Embed toggle, Open API and desktop lyrics window status

Failures are notified via lx-music-toast on shell.overlay; no toast is shown on success.

Launch Logic When Player is Not Running

When clicking play or switching songs, if the LX Music open API cannot be reached (API_OFFLINE), the host will attempt to use lx-music.ps1 -Mode launch to locate lx-music-desktop.exe and start it with -hidden (resident in tray, no main window), then probe the API every 250ms for up to 15 seconds. Once ready, it replays the current control request. The README documents implementation details regarding ELECTRON_RUN_AS_NODE and the -hidden parameter to avoid mistakenly launching LX Music as a headless process in the DSH (Electron) subprocess environment.

The control request body can include desired: "playing" | "paused" to prevent “intending to play but getting toggled to pause” after launch.

Same-origin HTTP Routes (Page does not connect directly to 23330)

The page only accesses DSH same-origin /lx-music/*, which is forwarded by the host to LX Music, avoiding CORS and not exposing port 23330 to the browser:

  • GET /lx-music/lyric — A frame of lyrics and playback info
  • POST /lx-music/control — action: prev | next | toggle
  • POST / GET /lx-music/lyrics — Desktop lyrics window visibility and status

Installation and Activation

Choose either method (commands and paths are from the repository README):

dsh plugin add afawfawffaf/dsh-plugin-lx-music

On the desktop client, you can also paste the repository address in DSH “Plugins → Add Plugin”:

https://github.com/afawfawffaf/dsh-plugin-lx-music

Note: Desktop profiles are managed by Electron; the CLI’s --profile desktop will be rejected. This is standard DSH behavior, not an issue with this plugin. The package is currently not published to npm. When sharing with others, you can use the git address, an npm pack .tgz file, or a local directory path (see the “Share with others” table in the README).

After installation, the plugin manager writes the package name to dsh.profile.bundles; manual editing of the profile’s package.json is generally not required.

Environment Requirements (from README):

  1. Windows (package.json declares "os": ["win32"], window operations use PowerShell + user32).
  2. LX Music v2.7+, with “Settings → Open API” enabled (default 127.0.0.1:23330); the lyrics area and capsules will not appear if not enabled.
  3. Restart DSH once after installation (the host is a Node process, modules are not hot-reloaded); subsequently, only a page refresh is needed when changing client-side code.

The plugin runs with the permissions of the current DSH process; please review the source code and MIT license before installation to ensure it complies with your security policy.

Typical Usage

Daily Operations

  1. Ensure LX Music has Open API enabled, and DSH has the plugin installed and restarted.
  2. View embedded lyrics in the DSH right-side wallpaper band; use capsules to switch songs or play/pause.
  3. When needing to focus on input, click the “Lyrics” button on the right of the input box to collapse the text, keeping the capsules.
  4. If you do not want to use embedding, go to the settings page to disable embedding and restore the LX Music desktop lyrics window.

Diagnostics and Manual Testing of Windows Scripts

The host provides GET /lx-music/debug and GET/POST /lx-music/client-report to facilitate troubleshooting loading and client steps.

In the repository directory, you can run the self-tests from the README (it will not actually control the player by default unless LX_TEST_CONTROL is set):

node test/lrc.mjs
node test/control-route.mjs
node test/host-routes.mjs
node test/client-bundle.mjs

To check LX Music process and lyrics window status, or manually launch / hide / show:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File lib\lx-music.ps1 -Mode state
powershell.exe -NoProfile -ExecutionPolicy Bypass -File lib\lx-music.ps1 -Mode launch

Output is a single line LXMUSIC_JSON:{...}.

Scenarios and Notes

Suitable for: Developers using DSH Desktop on Windows who also listen to music via LX Music and want lyrics and controls tucked into the right side of the conversation area without occupying a top-most floating window on the desktop.

Not suitable for: Non-Windows environments; scenarios where you cannot or do not wish to enable the local open API in LX Music; scenarios expecting the plugin to replace the LX Music player, take over the audio source, or system media keys (this plugin explicitly does not take over playback).

The DSH ecosystem emphasizes “Everything is a plugin”; SkillHub is a community directory and has no official affiliation with DeepSeek / High-Flyer. The facts in this article are derived from the repository README and package.json (current version 0.4.1); stars and subsequent versions are subject to the GitHub page.

Conclusion

dsh-plugin-lx-music brings LX Music’s lyrics and controls into the empty band on the right side of DSH. It reads and writes to the 127.0.0.1:23330 open API and hides the desktop lyrics window when embedding is enabled, reducing interruptions from floating windows while coding. The installation command is dsh plugin add afawfawffaf/dsh-plugin-lx-music; remember to ensure LX Music v2.7+, Open API is enabled, and DSH is restarted after installation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye