Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set brightness without having to install another CLI program #22

Open
sloganking opened this issue Mar 3, 2024 · 0 comments
Open

Set brightness without having to install another CLI program #22

sloganking opened this issue Mar 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sloganking
Copy link
Owner

Currently before the assistant can set the brightness, the user has to cargo install luster. As the set_screen_brightness() function just calls luster as a CLI command to set the brightness.

fn set_screen_brightness(brightness: u32) -> Option<()> {
    if brightness > 100 {
        println!("Brightness must be between 0 and 100");
        return None;
    }

    Command::new("luster")
        .arg(brightness.to_string())
        .output()
        .ok()
        .map(|_| ())
}

This is annoying and it would be more convenient if brightness setting came when the assistant is installed, with no other steps.

@sloganking sloganking added the enhancement New feature or request label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant