Skip to content

Commit

Permalink
3/3 Update docs w.r.t. new 'split' command
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitabobko committed Nov 5, 2023
1 parent fd70c83 commit cefda71
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 10 deletions.
20 changes: 10 additions & 10 deletions config-examples/i3-like-config-example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
23 changes: 23 additions & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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

```
Expand Down

0 comments on commit cefda71

Please sign in to comment.