add eww open-many
This commit is contained in:
parent
5fac2271b5
commit
1c6853cc5d
2 changed files with 12 additions and 0 deletions
|
@ -20,6 +20,7 @@ pub enum EwwCommand {
|
|||
UpdateVars(Vec<(VarName, PrimitiveValue)>),
|
||||
ReloadConfig(config::EwwConfig),
|
||||
ReloadCss(String),
|
||||
OpenMany(Vec<WindowName>),
|
||||
OpenWindow {
|
||||
window_name: WindowName,
|
||||
pos: Option<Coords>,
|
||||
|
@ -88,6 +89,11 @@ impl App {
|
|||
self.close_window(&window_name)?;
|
||||
}
|
||||
}
|
||||
EwwCommand::OpenMany(windows) => {
|
||||
for window in windows {
|
||||
self.open_window(&window, None, None, None)?;
|
||||
}
|
||||
}
|
||||
EwwCommand::OpenWindow {
|
||||
window_name,
|
||||
pos,
|
||||
|
|
|
@ -74,6 +74,11 @@ pub enum ActionWithServer {
|
|||
anchor: Option<AnchorPoint>,
|
||||
},
|
||||
|
||||
/// Open multiple windows at once.
|
||||
/// NOTE: This will in the future be part of eww open, and will then be removed.
|
||||
#[structopt(name = "open-many")]
|
||||
OpenMany { windows: Vec<WindowName> },
|
||||
|
||||
/// Close the window with the given name
|
||||
#[structopt(name = "close")]
|
||||
CloseWindow { window_name: WindowName },
|
||||
|
@ -127,6 +132,7 @@ impl ActionWithServer {
|
|||
let command = match self {
|
||||
ActionWithServer::Daemon | ActionWithServer::Ping => app::EwwCommand::NoOp,
|
||||
ActionWithServer::Update { mappings } => app::EwwCommand::UpdateVars(mappings.into_iter().collect()),
|
||||
ActionWithServer::OpenMany { windows } => app::EwwCommand::OpenMany(windows),
|
||||
ActionWithServer::OpenWindow {
|
||||
window_name,
|
||||
pos,
|
||||
|
|
Loading…
Add table
Reference in a new issue