Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 666 Bytes

README.md

File metadata and controls

35 lines (25 loc) · 666 Bytes

Power State Plugin (PSP)

Rust Cross-platform Power State Plugin (PSP).

Using an MPSC channel for emitting events when screen-locked, unlocked, sleep, wake up.

Support Platform

  • macOS
  • Windows
  • Unix (with D-Bus only)

Events

ScreenLocked

When you logout the session or close your laptop lid

ScreenUnlocked

When you login the session or open the laptop lid

Resume

Resume from sleep mode

Suspend

Turn your computer into sleep mode

Examples

With Tao

cargo run --example tao

With winit

cargo run --example winit