simplify clap structures

This commit is contained in:
Skia 2023-11-13 15:52:39 +01:00
parent 6d8c19e8a7
commit 99a99648b1

View file

@ -37,24 +37,24 @@ struct Cli {
#[derive(Subcommand, Debug)]
enum Command {
#[clap(about = "Initialize the workspace groups for all the outputs")]
Init(InitAction),
Init(Index),
#[clap(about = "Move the focused container to another workspace on the same workspace group")]
Move(MoveAction),
Move(Index),
#[clap(
about = "Move the focused container to the same workspace index on another workspace group"
)]
MoveToGroup(MoveAction),
MoveToGroup(Index),
#[clap(about = "Focus to another workspace on the same workspace group")]
Focus(FocusAction),
Focus(Index),
#[clap(about = "Focus to workspace group")]
FocusGroup(FocusAction),
FocusGroup(Index),
#[clap(about = "Focus to another workspace on all the outputs")]
FocusAllOutputs(FocusAction),
FocusAllOutputs(Index),
#[clap(about = "Move the focused container to the next output")]
NextOutput,
@ -73,20 +73,8 @@ enum Command {
}
#[derive(Args, Debug)]
struct InitAction {
#[clap(value_name = "index", help = "The index to initialize with")]
index: usize,
}
#[derive(Args, Debug)]
struct FocusAction {
#[clap(value_name = "index", help = "The index to focus on")]
index: usize,
}
#[derive(Args, Debug)]
struct MoveAction {
#[clap(value_name = "index", help = "The index to move the container to")]
struct Index {
#[clap(value_name = "index", help = "The workspace index to work with")]
index: usize,
}