Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vlad2030/thinkpad-backlight-api
Keyboard backlight API for thinkpad
https://github.com/vlad2030/thinkpad-backlight-api
linux rust thinkpad
Last synced: about 24 hours ago
JSON representation
Keyboard backlight API for thinkpad
- Host: GitHub
- URL: https://github.com/vlad2030/thinkpad-backlight-api
- Owner: Vlad2030
- License: apache-2.0
- Created: 2024-12-29T03:28:36.000Z (17 days ago)
- Default Branch: main
- Last Pushed: 2024-12-29T03:38:14.000Z (17 days ago)
- Last Synced: 2024-12-29T03:48:09.301Z (17 days ago)
- Topics: linux, rust, thinkpad
- Language: Rust
- Homepage: https://crates.io/crates/thinkpad-backlight-api
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# thinkpad-backlight-api
Keyboard backlight API for thinkpad. Implemented on Rust
# How to use
## Add a crate
Add this to your `Cargo.toml`:
```toml
thinkpad-backlight-api = "0.1.0"
```## Example usage
```rust
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 t480s (Ubuntu 24.04)