Preface¶
When working on Windows for long periods—referencing documentation, terminals, and browsers—DSH Desktop windows can easily get obscured by other applications, requiring constant Alt+Tab switching. The system’s built-in “Always on Top” capability is often hidden in right-click menus or third-party tools, and is not part of the same configuration as DSH’s plugin-based workflow. Below, we introduce the community plugin dsh-always-on-top: it adds a pin button to the right side of the DSH Desktop title bar (left of the minimize button). Click once to pin, click again to unpin; the state is remembered and restored on the next launch.
What is this¶
dsh-always-on-top is released by maintainer Suibianlilili and categorized as a DSH client plugin. The official description is: Provide a small pin button in the DSH Desktop title bar; clicking it keeps the window above all others, clicking again releases the pinning.
The implementation is lightweight: a single host route plus a client script, with no extra dependencies or build steps, weighing about 30 KB when unpacked. The package name and npm publish name are both dsh-always-on-top; the version listed in current materials is 0.1.4, and the license is MIT.
Core Features¶
Based on the GitHub README and package manifest, the verified capabilities are as follows:
- Title bar pin: The button is located at the right end of the title bar, to the left of the Windows minimize button.
- Win32 Pinning: Toggles “Always on top” via the
WS_EX_TOPMOSTwindow style; when pinned, the button turns blue with a tooltip “Always on top — click to unpin” (gray when not pinned). - State Persistence: The pinning state is written to
$DSH_HOME/dsh-always-on-top.json(default~/.dsh/) and reapplied on the next launch. - Environment Awareness: Only displays within DSH Desktop (Electron) on Windows; automatically hidden in
dsh web(browser) and other operating systems.
Installation and Activation¶
The package has been published to npm. The README explains: the desktop profile is held by the Electron app, and the DSH CLI does not manage this profile directly. You must use the commands below or install via the in-app plugin settings.
Install from npm (Recommended)¶
If using DSH CLI (web / tui profiles), you can add it to the web profile first; if targeting the desktop, it should be installed into the desktop profile and bundles updated.
# DSH CLI (web / tui profiles)
dsh plugin --profile web add dsh-always-on-top
# Or add directly to the desktop profile
pnpm -C "$env:USERPROFILE\.dsh\profiles\desktop" add dsh-always-on-top
# Then write "dsh-always-on-top" into dsh.profile.bundles and restart the application
Install from GitHub¶
pnpm -C "$env:USERPROFILE\.dsh\profiles\desktop" add "github:Suibianlilili/dsh-always-on-top"
# Then write "dsh-always-on-top" into dsh.profile.bundles and restart the application
Manual Steps¶
# 1. Install the package into the profile
pnpm -C "$env:USERPROFILE\.dsh\profiles\desktop" add dsh-always-on-top
# 2. Add "dsh-always-on-top" to dsh.profile.bundles in package.json
# 3. Restart the application
After following the steps above and restarting DSH Desktop, the pin control should appear on the title bar.
Typical Usage¶
The pin is located at the far right of the title bar, to the left of the minimize button:
- Gray: Not pinned
- Blue: Pinned
Click to toggle. The tooltip displays in English or Chinese depending on the system language.
A single toggle takes approximately 0.4–0.6 seconds (the host starts PowerShell to compile P/Invoke declarations), and the button shows a busy state; this is the expected behavior described in the README.
How It Works (Brief)¶
The plugin runs in the DSH host process; the Electron main process owns the window, and the host’s process.ppid is that main process. The flow is:
- Client click triggers
POST /dsh-always-on-top/toggle - Host resolves the main window handle using
Get-Process -Id <ppid> - PowerShell calls
user32!SetWindowPosto set or clearWS_EX_TOPMOST - Host reads back
GetWindowLong(GWL_EXSTYLE)and only reports success if the style bit actually changed
It does not modify Electron source, inject code into the main process, or rely on undocumented APIs.
Compatibility and Limitations¶
| Item | Requirement |
|---|---|
| OS | Windows 10 / 11 |
| Runtime | DSH Desktop (Electron) |
| DSH | 0.2.x (dsh.client injection), tested on 0.2.1-rc.2 in materials |
Limitations (from official documentation):
- Only affects the main window; the welcome page, update dialogs, etc., are not affected.
- If DSH modifies the title bar height or control area in the future, adjustments to
right(currently146px) andtop(currently7px) in the CSS oflib/client.jsmay be required.
Use Cases and Notes¶
Who is it for: Users doing development or operations with DSH Desktop on Windows who need a window to stay on top for long periods but do not want to leave the DSH plugin ecosystem.
Recommendations before installation: DSH plugins run under the permissions of the current dsh process; pinning calls Win32 APIs and reads/writes the state file under $DSH_HOME. Before installing, you should read the repository source code and the MIT license to ensure compliance with your security policy. The community directory SkillHub Plugin Page is an independent site and has no official affiliation with DeepSeek / High-Flyer; it should not be treated as an official app store.
Conclusion¶
dsh-always-on-top condenses “always keep window on top” into a single switch on the title bar. Configuration is handled via the desktop profile’s bundles, behavior is transparent, and dependencies are minimal. For installation details or to contribute code, see the directory page and GitHub:
- Directory Page: https://www.skillhub.cn/plugins/Suibianlilili/dsh-always-on-top
- GitHub: https://github.com/Suibianlilili/dsh-always-on-top