1 unstable release
0.1.0 | Dec 29, 2024 |
---|
#308 in Operating systems
116 downloads per month
6KB
65 lines
thinkpad-backlight-api
Keyboard backlight API for thinkpad. Implemented on Rust
How to use
Add a crate
Add this to your Cargo.toml
:
thinkpad-backlight-api = "0.1.0"
Example usage
use thinkpad_backlight_api::{KeyboardBacklight, LightLevel};
fn main() {
if let Err(e) = KeyboardBacklight::set(LightLevel::Full) {
println!("Error: {:?}", e)
}
match KeyboardBacklight::get() {
Ok(level) => println!("Level: {:?}", level),
Err(e) => println!("Error: {:?}", e),
}
}
Tested on
- Lenovo thinkpad 480s (Ubuntu 24.04)
Dependencies
~43KB