mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 09:38:32 +02:00
feat(swap-workspaces-monitor): command to swap focused monitor workspaces with another monitor
Basically this commit adds a command that allows you to swap two monitors, well it actually swaps the workspaces between the monitors.
This commit is contained in:
@@ -154,6 +154,7 @@ gen_target_subcommand_args! {
|
||||
FocusWorkspace,
|
||||
FocusWorkspaces,
|
||||
MoveWorkspaceToMonitor,
|
||||
SwapWorkspacesToMonitor,
|
||||
}
|
||||
|
||||
macro_rules! gen_named_target_subcommand_args {
|
||||
@@ -807,6 +808,9 @@ enum SubCommand {
|
||||
/// Move the focused workspace to the specified monitor
|
||||
#[clap(arg_required_else_help = true)]
|
||||
MoveWorkspaceToMonitor(MoveWorkspaceToMonitor),
|
||||
/// Swap focused monitior workspaces with specified monitor
|
||||
#[clap(arg_required_else_help = true)]
|
||||
SwapWorkspacesToMonitor(SwapWorkspacesToMonitor),
|
||||
/// Create and append a new workspace on the focused monitor
|
||||
NewWorkspace,
|
||||
/// Set the resize delta (used by resize-edge and resize-axis)
|
||||
@@ -1192,6 +1196,9 @@ fn main() -> Result<()> {
|
||||
SubCommand::MoveWorkspaceToMonitor(arg) => {
|
||||
send_message(&SocketMessage::MoveWorkspaceToMonitorNumber(arg.target).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::SwapWorkspacesToMonitor(arg) => {
|
||||
send_message(&SocketMessage::SwapWorkspacesToMonitorNumber(arg.target).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::InvisibleBorders(arg) => {
|
||||
send_message(
|
||||
&SocketMessage::InvisibleBorders(Rect {
|
||||
|
||||
Reference in New Issue
Block a user