feat(wm): promote

The first tile of a layout is its largest, and the place for the window being
worked on. `komorebic promote` moves the focused window there, with the windows
that were before it each moving one tile on; `promote-swap` swaps it with the
window that has the first tile, and from the first tile swaps it back with the
window it was last swapped with; `promote-window left|right|up|down` promotes
the window on that side of the focused one; and `promote-focus` gives the focus
to the first tile and moves nothing.

The grid layout has no largest tile, so the four do nothing there.

The vm-commands sweep gains the four.
This commit is contained in:
LGUG2Z committed 2026-10-28 07:20:37 -07:00
1 parent 95eb4d5039
commit 554d77aed9
17 files changed
+419 -6

No files matched your search

+15
View File
@@ -284,6 +284,17 @@ fn the_resize_subcommands_send_what_they_are_given() {
);
}
#[test]
fn the_promote_subcommands_send_their_message() {
sends(&["promote"], r#"{"type":"Promote"}"#);
sends(&["promote-swap"], r#"{"type":"PromoteSwap"}"#);
sends(&["promote-focus"], r#"{"type":"PromoteFocus"}"#);
sends(
&["promote-window", "right"],
r#"{"type":"PromoteWindow","content":"Right"}"#,
);
}
#[test]
fn mouse_follows_focus_is_set_with_enable_and_disable_or_toggled() {
sends(
@@ -355,6 +366,10 @@ fn docgen_writes_the_help_of_every_subcommand_in_a_text_fence() {
"mouse-follows-focus.md",
"move.md",
"preselect-direction.md",
"promote-focus.md",
"promote-swap.md",
"promote-window.md",
"promote.md",
"query.md",
"quick-load-resize.md",
"quick-save-resize.md",