Skip to content

Commit

Permalink
Bump clap to 4.4 (#161)
Browse files Browse the repository at this point in the history
* Bump clap to 4.4

* Fix resolver when using 2021 edition
  • Loading branch information
diego-plan9 committed Aug 30, 2023
1 parent 9199d17 commit a7c7206
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 26 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[workspace]
resolver = "2"
members = ["crates/*"]
4 changes: 2 additions & 2 deletions crates/lillinput-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ keywords = ["i3", "touchpad", "x11", "libinput", "gestures"]
categories = ["command-line-utilities", "gui"]

[dependencies]
clap = { version = "~3.2.17", features = ["derive"] }
clap-verbosity-flag = "~1.0.1"
clap = { version = "4.4", features = ["derive"] }
clap-verbosity-flag = "2.0"
config = "0.13"
i3ipc = "0.10"
lillinput = { path = "../lillinput", version = "0.3.0" }
Expand Down
48 changes: 24 additions & 24 deletions crates/lillinput-cli/src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,76 +94,76 @@ impl fmt::Display for StringifiedAction {

/// Connect libinput gestures to i3 and others.
#[derive(Parser, Debug, Clone)]
#[clap(version = env!("CARGO_PKG_VERSION"), author = env!("CARGO_PKG_AUTHORS"))]
#[command(version = env!("CARGO_PKG_VERSION"), author = env!("CARGO_PKG_AUTHORS"))]
pub struct Opts {
/// Configuration file.
#[clap(short, long)]
#[arg(short, long)]
pub config_file: Option<String>,
/// Level of verbosity (additive, can be used up to 3 times)
#[clap(flatten)]
#[command(flatten)]
pub verbose: Verbosity<InfoLevel>,
/// libinput seat
#[clap(short, long)]
#[arg(short, long)]
pub seat: Option<String>,
/// enabled action types
#[clap(short, long, possible_values = ActionType::VARIANTS)]
#[arg(short, long, value_parser = clap::builder::PossibleValuesParser::new(ActionType::VARIANTS))]
pub enabled_action_types: Option<Vec<String>>,
/// minimum threshold for displacement changes
#[clap(short, long)]
#[arg(short, long)]
pub threshold: Option<f64>,
/// actions for the "three-finger swipe left" event
#[clap(long)]
#[arg(long)]
pub three_finger_swipe_left: Option<Vec<StringifiedAction>>,
/// actions for the "three-finger swipe left-up" event
#[clap(long)]
#[arg(long)]
pub three_finger_swipe_left_up: Option<Vec<StringifiedAction>>,
/// actions for the "three-finger swipe up" event
#[clap(long)]
#[arg(long)]
pub three_finger_swipe_up: Option<Vec<StringifiedAction>>,
/// actions for the "three-finger swipe right-up" event
#[clap(long)]
#[arg(long)]
pub three_finger_swipe_right_up: Option<Vec<StringifiedAction>>,
/// actions for the "three-finger swipe right" event
#[clap(long)]
#[arg(long)]
pub three_finger_swipe_right: Option<Vec<StringifiedAction>>,
/// actions for the "three-finger swipe right-down" event
#[clap(long)]
#[arg(long)]
pub three_finger_swipe_right_down: Option<Vec<StringifiedAction>>,
/// actions for the "three-finger swipe down" event
#[clap(long)]
#[arg(long)]
pub three_finger_swipe_down: Option<Vec<StringifiedAction>>,
/// actions for the "three-finger swipe left-down" event
#[clap(long)]
#[arg(long)]
pub three_finger_swipe_left_down: Option<Vec<StringifiedAction>>,
/// actions for the "four-finger swipe left" event
#[clap(long)]
#[arg(long)]
pub four_finger_swipe_left: Option<Vec<StringifiedAction>>,
/// actions for the "four-finger swipe left-up" event
#[clap(long)]
#[arg(long)]
pub four_finger_swipe_left_up: Option<Vec<StringifiedAction>>,
/// actions for the "four-finger swipe up" event
#[clap(long)]
#[arg(long)]
pub four_finger_swipe_up: Option<Vec<StringifiedAction>>,
/// actions for the "four-finger swipe right-up" event
#[clap(long)]
#[arg(long)]
pub four_finger_swipe_right_up: Option<Vec<StringifiedAction>>,
/// actions for the "four-finger swipe right" event
#[clap(long)]
#[arg(long)]
pub four_finger_swipe_right: Option<Vec<StringifiedAction>>,
/// actions for the "four-finger swipe right-down" event
#[clap(long)]
#[arg(long)]
pub four_finger_swipe_right_down: Option<Vec<StringifiedAction>>,
/// actions for the "four-finger swipe down" event
#[clap(long)]
#[arg(long)]
pub four_finger_swipe_down: Option<Vec<StringifiedAction>>,
/// actions for the "four-finger swipe left-down" event
#[clap(long)]
#[arg(long)]
pub four_finger_swipe_left_down: Option<Vec<StringifiedAction>>,
/// invert the X axis (considering positive displacement as "left")
#[clap(long)]
#[arg(long)]
pub invert_x: Option<bool>,
/// invert the Y axis (considering positive displacement as "up")
#[clap(long)]
#[arg(long)]
pub invert_y: Option<bool>,
}

Expand Down

0 comments on commit a7c7206

Please sign in to comment.