mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-19 23:31:25 +02:00
feat(wm): add cmd to toggle new window behaviour
This commit introduces a new command, toggle-new-window-behaviour, which can be used to toggle how new windows on the screen will be handled. The default setting is to add a new window in a dedicated container, but when toggled, new windows will be stacked on top of the currently focused window container. This can be useful if you only want to use a certain number of columns, and when you have enough windows on the screen for them, you can toggle the new window behaviour to start appending to the existing column stacks. This commit also fixes a bug where stacked windows being closed did cause the next window underneath in the stack to be shown. re #72
This commit is contained in:
@@ -483,7 +483,9 @@ enum SubCommand {
|
||||
/// Set the workspace name for the specified workspace
|
||||
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
|
||||
WorkspaceName(WorkspaceName),
|
||||
/// Toggle the window manager on and off across all monitors
|
||||
/// Toggle the behaviour for new windows (stacking or dynamic tiling)
|
||||
ToggleNewWindowBehaviour,
|
||||
/// Toggle window tiling on the focused workspace
|
||||
TogglePause,
|
||||
/// Toggle window tiling on the focused workspace
|
||||
ToggleTiling,
|
||||
@@ -958,6 +960,9 @@ fn main() -> Result<()> {
|
||||
SubCommand::ResizeDelta(arg) => {
|
||||
send_message(&*SocketMessage::ResizeDelta(arg.pixels).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::ToggleNewWindowBehaviour => {
|
||||
send_message(&*SocketMessage::ToggleNewWindowBehaviour.as_bytes()?)?;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user