Skip to content

Commit

Permalink
Allow negative offset
Browse files Browse the repository at this point in the history
  • Loading branch information
Supernovatux committed Sep 3, 2022
1 parent 19c03a4 commit 8490809
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

Automatically change brightness depending on screen contents. The program takes a screenshot of the primary screen and calculates its average RGB value and increases/decreases the brightness by a certain value.
## Installation

Git clone the repo and do a cargo build.

```bash
git clone https://github.com/Supernovatux/auto_backlight
cd auto_backlight
cargo build --release
./target/release/auto_backlight -h
cargo install --path=./
#Make sure ~/.cargo/bin is in your PATH
auto_backlight -h
```

## Roadmap
Expand Down
10 changes: 6 additions & 4 deletions src/cli_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ pub struct Cli {
///Maximum and minimum change to brightness;
#[clap(short, long, value_parser, default_value_t = 10)]
pub limit: i16,
///Offset to limit. Use as --offset=<Value>
/// if limit=10
/// offset = -5
///Offset to limit.
/// #Example
/// ```bash
/// auto_backlight --offset -5 --limit
/// ```
/// then brightness will vary between -15 to 5;
#[clap(long, value_parser, default_value_t = -7)]
#[clap(long,short,allow_hyphen_values = true ,value_parser, default_value_t = -7)]
pub offset: i16,
///Interval in which brightness values are refreshed
#[clap(short, long, value_parser, default_value_t = 5)]
Expand Down

0 comments on commit 8490809

Please sign in to comment.