diff --git a/crates/eww/src/app.rs b/crates/eww/src/app.rs index 00fef726..9f4a4cc6 100644 --- a/crates/eww/src/app.rs +++ b/crates/eww/src/app.rs @@ -106,7 +106,7 @@ impl WindowInitiator { config_name, pos: WindowInitiator::extract_value_from_args::("pos", &mut args)?, size: WindowInitiator::extract_value_from_args::("size", &mut args)?, - monitor: WindowInitiator::extract_value_from_args::("screen", &mut args)?, + monitor: WindowInitiator::extract_value_from_args::("screen", &mut args)?, anchor: WindowInitiator::extract_value_from_args::("anchor", &mut args)?, args, }; @@ -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()); diff --git a/crates/eww/src/opts.rs b/crates/eww/src/opts.rs index b808466b..b269ee5d 100644 --- a/crates/eww/src/opts.rs +++ b/crates/eww/src/opts.rs @@ -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