dsh-power-switch

Adds a power button to the session header with two actions, each requiring a second click to confirm. Restart terminates the Electron main process itself (taskkill /F without /T), so no crash dialog appears: the host then exits gracefully on its own once the IPC channel drops, and a detached helper relaunches the same executable after the single-instance lock is released, confirming the new instance by a real window handle. Shut down does the same without relaunching. Leftover GPU and renderer processes from the previous run are reaped best-effort. Windows desktop app.

Overview

Adds a power button to the session header with two actions, each requiring a second click to confirm. Restart terminates the Electron main process itself (taskkill /F without /T), so no crash dialog appears: the host then exits gracefully on its own once the IPC channel drops, and a detached helper relaunches the same executable after the single-instance lock is released, confirming the new instance by a real window handle. Shut down does the same without relaunching. Leftover GPU and renderer processes from the previous run are reaped best-effort. Windows desktop app.

Installation

Install from GitHub

dsh plugin --profile web add github:hongdougao111/dsh-power-switch

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.

Installation notes

  • May run terminal commands