-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Completions and improved pkgbuild
- Loading branch information
1 parent
4830d6a
commit 2e99e17
Showing
7 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/target | ||
PKGBUILD | ||
auto_backlight-*.*.*-x86_64.tar.gz | ||
auto-backlight-*.*.*-x86_64.tar.gz | ||
tar-helper.sh | ||
*.out* | ||
completions |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
[package] | ||
name = "auto_backlight" | ||
version = "1.0.1" | ||
version = "2.0.0" | ||
edition = "2021" | ||
authors = ["Supernovatux <[email protected]>"] | ||
homepage = "https://github.com/Supernovatux/auto_backlight" | ||
repository = "https://github.com/Supernovatux/auto_backlight" | ||
description = "A tool to automatically change brightness based on screen contents" | ||
keywords = ["brightness-control","rust","linux"] | ||
license = "MIT" | ||
include = ["LICENSE", "README.md"] | ||
include = ["LICENSE", "README.md","completions/auto-backlight.fish"] | ||
build = "build.rs" | ||
|
||
[profile.release] | ||
lto = "fat" | ||
|
@@ -34,4 +35,13 @@ glob = "*" | |
ksni = "*" | ||
fast_image_resize = "*" | ||
futures = "*" | ||
futures-timer = "*" | ||
futures-timer = "*" | ||
|
||
[build-dependencies] | ||
clap = "*" | ||
clap_complete = "*" | ||
clap-verbosity-flag = "*" | ||
log = "*" | ||
[[bin]] | ||
name = "auto-backlight" | ||
path = "src/main.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
use clap::*; | ||
use clap_complete::{ | ||
generate_to, | ||
shells::{Bash, Fish, Zsh}, | ||
}; | ||
use std::io::Error; | ||
|
||
include!("src/cli_parser.rs"); | ||
|
||
fn main() -> Result<(), Error> { | ||
let outdir = "completions"; | ||
let mut cmd = Cli::into_app(); | ||
generate_to( | ||
Bash, | ||
&mut cmd, // We need to specify what generator to use | ||
"auto-backlight", // We need to specify the bin name manually | ||
outdir, // We need to specify where to write to | ||
)?; | ||
generate_to( | ||
Zsh, | ||
&mut cmd, // We need to specify what generator to use | ||
"auto-backlight", // We need to specify the bin name manually | ||
outdir, // We need to specify where to write to | ||
)?; | ||
generate_to( | ||
Fish, | ||
&mut cmd, // We need to specify what generator to use | ||
"auto-backlight", // We need to specify the bin name manually | ||
outdir, // We need to specify where to write to | ||
)?; | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters