tauri-plugin-nosleep-api
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

tauri-plugin-nosleep

Test

Tauri plugin to block the power save functionality in the OS

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

Add the NPM package.

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

Use this within TS/JS.

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

Package Sidebar

Install

npm i tauri-plugin-nosleep-api

Weekly Downloads

44

Version

0.1.1

License

none

Unpacked Size

1.18 MB

Total Files

38

Last publish

Collaborators

  • pevers