5 releases
0.2.1 | Nov 20, 2022 |
---|---|
0.2.0 | May 8, 2022 |
0.2.0-rc.2 | May 7, 2022 |
0.2.0-rc.1 | May 4, 2022 |
#4 in #caffeine
339 downloads per month
Used in 2 crates
(via nosleep)
15KB
248 lines
nosleep-nix
Linux library to block the power save function and preventing the OS to sleep.
lib.rs
:
Wrapper utility to block and unblock the Linux power save mode. It uses either the org.gnome.SessionManager D-Bus or the org.freedesktop.PowerManagement API under the hood.
Heavily inspired on the Chromium source code: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/services/device/wake_lock/power_save_blocker/power_save_blocker_linux.cc
Dependencies
~7MB
~153K SLoC