Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoWhittome authored and WilfSilver committed Dec 14, 2022
1 parent 4abbe8d commit dc20b02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions crates/eww/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl WindowInitiator {
config_name,
pos: WindowInitiator::extract_value_from_args::<Coords>("pos", &mut args)?,
size: WindowInitiator::extract_value_from_args::<Coords>("size", &mut args)?,
monitor: WindowInitiator::extract_value_from_args::<i32>("screen", &mut args)?,
monitor: WindowInitiator::extract_value_from_args::<MonitorIdentifier>("screen", &mut args)?,
anchor: WindowInitiator::extract_value_from_args::<AnchorPoint>("anchor", &mut args)?,
args,
};
Expand Down Expand Up @@ -136,7 +136,11 @@ impl WindowInitiator {
local_variables.insert(VarName::from("id"), DynVal::from(id));
}
if self.monitor.is_some() && expected_args.contains(&"screen".to_string()) {
local_variables.insert(VarName::from("screen"), DynVal::from(self.monitor.unwrap()));
let mon_dyn = match self.monitor.clone().unwrap() {
MonitorIdentifier::Numeric(x) => DynVal::from(x),
MonitorIdentifier::Name(x) => DynVal::from(x),
};
local_variables.insert(VarName::from("screen"), mon_dyn);
}

local_variables.extend(self.args.clone().into_iter());
Expand Down
4 changes: 2 additions & 2 deletions crates/eww/src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ pub enum ActionWithServer {
/// NOTE: This will in the future be part of eww open, and will then be removed.
#[command(name = "open-many")]
OpenMany {
#[structopt(parse(try_from_str = parse_window_config_and_id))]
#[clap(parse(try_from_str = parse_window_config_and_id))]
windows: Vec<(String, String)>,

#[structopt(long, parse(try_from_str = parse_window_id_args))]
#[clap(long, parse(try_from_str = parse_window_id_args))]
args: Vec<(String, VarName, DynVal)>,

/// If a window is already open, close it instead
Expand Down

0 comments on commit dc20b02

Please sign in to comment.