mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-19 07:08:48 +01:00
With the focus moving, the next thing a key has to do is move the focused window. `komorebic move left|right|up|down` swaps the focused container with the one whose tile is on that side, as the layout sees it, and `komorebic cycle-move next|previous` with the next or the previous one in the workspace's order. The workspace is tiled again, the window that moved keeps the focus, and the pointer follows it. The swap goes through the lockable sequence, so a lock stays with its index: the container moved onto a locked index is locked in its place. Moving towards a side with no window fails and moves nothing. Moving into the next monitor comes with more than one monitor, and the floating layer's own move with the floating layer. The VM test moves a window in a real KWin and back, and checks that KWin has every window where komorebi asked.
39 lines
1.1 KiB
Markdown
39 lines
1.1 KiB
Markdown
# Moving windows
|
|
|
|
komorebi moves the focused window to another tile of its workspace when it is told to. The
|
|
window swaps places with the window on that tile, the workspace is tiled again, and the window
|
|
that moved keeps the focus.
|
|
|
|
## In a direction
|
|
|
|
[`komorebic move`](../cli/move.md) swaps the focused window with the window whose tile is on one
|
|
side of it: `left`, `right`, `up` or `down`. As with
|
|
[`komorebic focus`](focusing-windows.md#in-a-direction), the layout decides which tile is on
|
|
which side.
|
|
|
|
```sh
|
|
komorebic move left
|
|
komorebic move down
|
|
komorebic move up
|
|
komorebic move right
|
|
```
|
|
|
|
When there is no tile on that side, nothing moves, and the daemon logs "there is no container
|
|
in this direction".
|
|
|
|
## In order
|
|
|
|
[`komorebic cycle-move`](../cli/cycle-move.md) swaps the focused window with the next or the
|
|
previous window in the order of the workspace, and wraps around: `next` from the last window
|
|
swaps it with the first.
|
|
|
|
```sh
|
|
komorebic cycle-move next
|
|
komorebic cycle-move previous
|
|
```
|
|
|
|
## The pointer
|
|
|
|
The pointer follows the window that moved, unless
|
|
[mouse follows focus](focusing-windows.md#the-pointer) is off.
|