ElectronPowerSaveBlocker
Unofficial
Electron powerSaveBlocker module for blocking the system from entering low-power (sleep) mode.
Import:
import type { ElectronPowerSaveBlocker } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface ElectronPowerSaveBlockerMethods
| Method | Returns | Description | |
|---|---|---|---|
| isStarted(id) | boolean | Whether the corresponding powerSaveBlocker has started. | |
| start(type) | number | Starts preventing the system from entering lower-power mode. Returns an integer identifying the power save blocker.prevent-display-sleep has higher precedence over prevent-app-suspension. Only the highest precedence type takes effect. In other words, prevent-display-sleep always takes precedence over prevent-app-suspension. | |
| stop(id) | void | Stops the specified power save blocker. |
Links to this page: