mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-11 07:32:51 +02:00
feat(wm): add send-to-workspace/monitor cmds
This commit adds two commands to allow the user to send the currently focused container to a different workspace or monitor as a background operation, without following the moved container to the destination workspace or monitor. resolve #20
This commit is contained in:
@@ -101,6 +101,8 @@ macro_rules! gen_target_subcommand_args {
|
||||
gen_target_subcommand_args! {
|
||||
MoveToMonitor,
|
||||
MoveToWorkspace,
|
||||
SendToMonitor,
|
||||
SendToWorkspace,
|
||||
FocusMonitor,
|
||||
FocusWorkspace
|
||||
}
|
||||
@@ -270,6 +272,12 @@ enum SubCommand {
|
||||
/// Move the focused window to the specified workspace
|
||||
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
|
||||
MoveToWorkspace(MoveToWorkspace),
|
||||
/// Send the focused window to the specified monitor
|
||||
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
|
||||
SendToMonitor(SendToMonitor),
|
||||
/// Send the focused window to the specified workspace
|
||||
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
|
||||
SendToWorkspace(SendToWorkspace),
|
||||
/// Focus the specified monitor
|
||||
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
|
||||
FocusMonitor(FocusMonitor),
|
||||
@@ -422,6 +430,12 @@ fn main() -> Result<()> {
|
||||
SubCommand::MoveToWorkspace(arg) => {
|
||||
send_message(&*SocketMessage::MoveContainerToWorkspaceNumber(arg.target).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::SendToMonitor(arg) => {
|
||||
send_message(&*SocketMessage::SendContainerToMonitorNumber(arg.target).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::SendToWorkspace(arg) => {
|
||||
send_message(&*SocketMessage::SendContainerToWorkspaceNumber(arg.target).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::ContainerPadding(arg) => {
|
||||
send_message(
|
||||
&*SocketMessage::ContainerPadding(arg.monitor, arg.workspace, arg.size)
|
||||
|
||||
Reference in New Issue
Block a user