use crate::SimpleConfig;
use clap::Args;
use crate::cli::shared;
#[derive(Args, Debug, Clone)]
pub struct SimpleConf {
#[arg(long, default_value = "false", action = clap::ArgAction::Set, default_missing_value = "true", num_args=0..=1
)]
pub include_special_workspaces: bool,
#[arg(long, default_value = "false", action = clap::ArgAction::Set, default_missing_value = "true", num_args=0..=1
)]
pub ignore_workspaces: bool,
#[arg(long, default_value = "false", action = clap::ArgAction::Set, default_missing_value = "true", num_args=0..=1
)]
pub ignore_monitors: bool,
#[arg(short = 's', long)]
pub filter_same_class: bool,
#[arg(short = 'w', long)]
pub filter_current_workspace: bool,
#[arg(short = 'm', long)]
pub filter_current_monitor: bool,
#[arg(long, default_value = "false", action = clap::ArgAction::Set, default_missing_value = "true", num_args=0..=1
)]
pub sort_recent: bool,
#[arg(long, default_value_t, value_enum)]
pub switch_type: shared::InputSwitchType,
}
impl From<SimpleConf> for SimpleConfig {
fn from(opts: SimpleConf) -> Self {
Self {
ignore_monitors: opts.ignore_monitors,
ignore_workspaces: opts.ignore_workspaces,
sort_recent: opts.sort_recent,
filter_current_workspace: opts.filter_current_workspace,
filter_current_monitor: opts.filter_current_monitor,
filter_same_class: opts.filter_same_class,
include_special_workspaces: opts.include_special_workspaces,
switch_type: opts.switch_type.into(),
}
}
}