Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.
/ nosleep-mac-sys Public archive

macOS library to block the power save function and preventing the OS to sleep

License

Notifications You must be signed in to change notification settings

pevers/nosleep-mac-sys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nosleep-mac-sys

Continuous Integration Crates.io license version Crates.io

macOS library to block the power save function and preventing the OS to sleep.

Usage

# Cargo.toml
[dependencies]
nosleep-mac-sys = "0.1.0"

Documentation

The documentation can be found here.

Example

use nosleep_mac_sys::*;
let handle = start(NoSleepType::PreventUserIdleSystemSleep);
if let Some(handle) = handle {
  println!("Block is active with handle {}", handle);
  stop(handle);
  println!("Block is deactivated");
}

About

macOS library to block the power save function and preventing the OS to sleep

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published