diff --git a/config-examples/i3-like-config-example.toml b/config-examples/i3-like-config-example.toml index 9bcd7a8b..087869d8 100644 --- a/config-examples/i3-like-config-example.toml +++ b/config-examples/i3-like-config-example.toml @@ -6,18 +6,18 @@ enable-normalization-opposite-orientation-for-nested-containers = false [mode.main.binding] alt-enter = 'exec-and-forget open -n /System/Applications/Utilities/Terminal.app' -alt-h = 'focus left' -alt-j = 'focus down' -alt-k = 'focus up' -alt-l = 'focus right' +alt-j = 'focus left' +alt-k = 'focus down' +alt-l = 'focus up' +alt-semicolon = 'focus right' -alt-shift-h = 'move-through left' -alt-shift-j = 'move-through down' -alt-shift-k = 'move-through up' -alt-shift-l = 'move-through right' +alt-shift-j = 'move-through left' +alt-shift-k = 'move-through down' +alt-shift-l = 'move-through up' +alt-shift-semicolon = 'move-through right' -# alt-h = 'split h' # todo support split command? https://github.com/nikitabobko/AeroSpace/issues/10 -# alt-v = 'split v' # todo support split command? https://github.com/nikitabobko/AeroSpace/issues/10 +alt-h = 'split horizontal' +alt-v = 'split vertical' # alt-f = 'fullscreen' # todo support fullscreen command? https://github.com/nikitabobko/AeroSpace/issues/7 diff --git a/docs/commands.md b/docs/commands.md index 79a2b6ce..b5061cd2 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -14,6 +14,7 @@ - [move-workspace-to-display](#move-workspace-to-display) - [reload-config](#reload-config) - [resize](#resize) +- [split](#split) - [workspace-back-and-forth](#workspace-back-and-forth) - [workspace](#workspace) @@ -272,6 +273,28 @@ Second argument controls how much the size is changes - If the `number` is prefixed with `-` then the dimension is decreased - If the `number` is prefixed with neither `+` nor `-` then the command changes the absolute value of the dimension +## split + +``` +split (horizontal|vertical|opposite) +``` + +**If the parent of currently focused window contains more than one child**, then the command + +1. Creates a new tiling container +2. Replaces currently focused window with the container +3. Puts the currently focused window into the container as its the only child + +The argument configures orientation of the newly created container. `opposite` means opposite orientation compared to the parent +container. + +**If the parent of currently focused window contains only a single child** (the window itself), then `split` command changes the +orientation of the parent container + +> [!IMPORTANT] +> `split` command does nothing if `enable-normalization-flatten-containers` is turned on. Consider using `join-with` if you want +> to keep `enable-normalization-flatten-containers` enabled + ## workspace-back-and-forth ```