mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-05-07 11:17:49 +00:00
update dependencies
This commit is contained in:
parent
dbccffc135
commit
7d57c0a8a8
4 changed files with 106 additions and 55 deletions
src
18
src/cli.rs
18
src/cli.rs
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue