# tauri-plugin-nosleep-api

> Tauri plugin to block the power save functionality in the OS

Latest version **0.1.1** (published 2023-11-08) · 0 weekly downloads

## Install

```sh
npm install tauri-plugin-nosleep-api
pnpm add tauri-plugin-nosleep-api
yarn add tauri-plugin-nosleep-api
bun add tauri-plugin-nosleep-api
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2023-11-08 |
| First published | 2022-05-08 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Peter Evers |
| Maintainers | pevers |
| Keywords | tauri-plugin-nosleep, caffeine, nosleep |

## Links

- npm: https://www.npmjs.com/package/tauri-plugin-nosleep-api
- npm.io page: https://npm.io/package/tauri-plugin-nosleep-api

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.1.0
- [@tauri-apps/api](https://npm.io/package/@tauri-apps/api.md) 1.0.0-rc.4

## Recent versions

- 0.1.1 (latest) — 2023-11-08
- 0.1.0 — 2022-05-08
- 0.1.0-rc.1 — 2022-05-08

## README

# tauri-plugin-nosleep

![Test](https://github.com/pevers/tauri-plugin-nosleep/workflows/Test/badge.svg)

Tauri plugin to block the power save functionality in the OS

```rust
fn main() {
  tauri::Builder::default()
    .plugin(tauri_plugin_nosleep::init())
    .run(tauri::generate_context!())
    .expect("failed to run app");
}
```

Add the NPM package.

```console
npm install tauri-plugin-nosleep-api
# or
yarn add tauri-plugin-nosleep-api
```

Use this within TS/JS.

```js
import { block, NoSleepType, unblock } from 'tauri-plugin-nosleep-api'
block(NoSleepType.PreventUserIdleDisplaySleep);
// To unblock whenever you are done
unblock();
```

---
_Source: https://npm.io/package/tauri-plugin-nosleep-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
