mirror of
https://gitlab.com/hyask/swaysome.git
synced 2025-12-09 23:34:42 +01:00
simplify clap structures
This commit is contained in:
parent
6d8c19e8a7
commit
99a99648b1
1 changed files with 8 additions and 20 deletions
28
src/main.rs
28
src/main.rs
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue