ppd-rs
A Rust interface to the Power Profiles Daemon for Linux systems.
Overview
ppd-rs provides a complete Rust API for interacting with the Power Profiles Daemon (PPD) on Linux systems.
The library allows applications to:
- Query and set power profiles (performance, balanced, power-saver)
- Hold specific profiles for application needs
- Configure power-related actions
- Monitor and control battery-aware behavior
The project includes both a library for integration into other Rust applications and a command-line utility (ppd) for direct interaction with power profiles.
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Command-Line Usage
The included ppd utility allows you to interact with power profiles from the command line:
# List available profiles
ppd list
# Get the current profile
ppd get
# Set a specific profile
ppd set performance
# Configure battery-aware behavior
ppd configure-battery-aware --enable
# List available actions
ppd list-actions
Library Usage
Here's a simple example of using the library in your Rust application:
use ;
use Connection;
Development
To build the project:
cargo build
To run the command-line utility:
cargo run
License
This project is licensed under the MIT License.