dsh-shutdown-idle

Runs a chosen power action (shutdown / restart / hibernate / sleep / lock / logoff) once every Agent session and background job has gone idle: the plugin samples in-process sessions once per second, counts running sessions as always busy, checks running background jobs through a configurable option (considerJobs, on by default, shown with its live count in Settings), waits a confirm window and then a cancellable countdown, and shows a draggable bottom-right card with the current phase and remaining seconds; the enable toggle never survives a host restart, any newly started session or Cancel aborts the countdown, and if the agents service is unavailable the machine is treated as busy so nothing ever fires. Windows only (the built-in shutdown / rundll32 actions); every action except none degrades to none elsewhere.

Overview

Runs a chosen power action (shutdown / restart / hibernate / sleep / lock / logoff) once every Agent session and background job has gone idle: the plugin samples in-process sessions once per second, counts running sessions as always busy, checks running background jobs through a configurable option (considerJobs, on by default, shown with its live count in Settings), waits a confirm window and then a cancellable countdown, and shows a draggable bottom-right card with the current phase and remaining seconds; the enable toggle never survives a host restart, any newly started session or Cancel aborts the countdown, and if the agents service is unavailable the machine is treated as busy so nothing ever fires. Windows only (the built-in shutdown / rundll32 actions); every action except none degrades to none elsewhere.

Installation

Install from GitHub

dsh plugin --profile web add github:liaoyuqing/dsh-shutdown-idle

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