Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)