update dependencies

This commit is contained in:
crapStone 2022-07-15 23:34:09 +02:00
parent dbccffc135
commit 7d57c0a8a8
No known key found for this signature in database
GPG key ID: 4CAA9E39EEDEB1F0
4 changed files with 106 additions and 55 deletions

View file

@ -1,6 +1,6 @@
use clap::{App, Arg, ArgGroup};
pub fn build_cli() -> App<'static, 'static> {
pub fn build_cli() -> App<'static> {
App::new("lamp")
.version(env!("CARGO_PKG_VERSION"))
.author("crapStone <crapstone01@gmail.com>")
@ -8,7 +8,7 @@ pub fn build_cli() -> App<'static, 'static> {
.global_setting(clap::AppSettings::ArgRequiredElseHelp)
.arg(
Arg::with_name("set")
.short("s")
.short('s')
.long("set")
.value_name("VALUE")
.help("Sets brightness to given value")
@ -16,7 +16,7 @@ pub fn build_cli() -> App<'static, 'static> {
)
.arg(
Arg::with_name("inc")
.short("i")
.short('i')
.long("increase")
.value_name("PERCENT")
.help("Increases brightness")
@ -24,7 +24,7 @@ pub fn build_cli() -> App<'static, 'static> {
)
.arg(
Arg::with_name("dec")
.short("d")
.short('d')
.long("decrease")
.value_name("PERCENT")
.help("Decreases brightness")
@ -32,19 +32,19 @@ pub fn build_cli() -> App<'static, 'static> {
)
.arg(
Arg::with_name("get")
.short("g")
.short('g')
.long("get")
.help("Prints current brightness value"),
)
.arg(
Arg::with_name("zer")
.short("z")
.short('z')
.long("zero")
.help("Sets brightness to lowest value"),
)
.arg(
Arg::with_name("ful")
.short("f")
.short('f')
.long("full")
.help("Sets brightness to highest value"),
)
@ -54,14 +54,14 @@ pub fn build_cli() -> App<'static, 'static> {
)
.arg(
Arg::with_name("list")
.short("l")
.short('l')
.long("list")
.help("Lists all available brightness and led controllers")
.conflicts_with_all(&["brightness_control"]),
)
.arg(
Arg::with_name("ctrl_type")
.short("t")
.short('t')
.long("type")
.value_name("controller_type")
.takes_value(true)