Files
komorebi/docs/usage/floating-windows.md
T
LGUG2Z 12b0aa9301 feat(wm): the floating layer
A workspace with floating windows had no way to say which of the two kinds of
windows a focus or move command was about, so the commands always acted on the
tiles. A workspace is now on one of two layers, tiling or floating, and
`komorebic focus`, `cycle-focus`, `move` and the resize commands act on the
windows of that layer. Floating a window puts the workspace on the floating
layer, and so does a window that a float rule floats when it opens and a focus
change to a floating window; putting the window back, tiling a new window and a
focus change to a tile put it on the tiling layer. `komorebic
toggle-workspace-layer` switches it by hand: the windows of the layer it goes to
are raised, the focused one last, and one of them is given the focus. Going to
the tiles hides the floating windows, and going back to the floating layer shows
them.

On the floating layer, focusing in a direction goes to the nearest floating
window on that side and, where there is none, crosses to the next workspace or
the monitor on that side as it does for tiles, and fails where there is none.
Cycling goes round the floating windows in the order they were floated, `move`
moves the focused floating window by the resize delta without leaving the work
area, the resize commands change its frame, and `preselect-direction` does
nothing. A floating window that is maximized leaves the floating windows. The
layer is in the state of each workspace.

A window that opens while a workspace is on its floating layer floats when the
floating layer behavior says so: the workspace's own, else its monitor's, else
the window manager's. All three tile by default, and only the configuration
file, which is not here yet, sets the first two.

komorebi/tests/floating_layer.rs drives the layers against the fake desktop,
with the floating layer behavior as well, and the vm-commands sweep runs the new
command.
2026-10-28 07:20:37 -07:00

3.4 KiB

Floating windows

A floating window is one of a workspace's windows that is not in its layout: komorebi gives it no tile and does not move it, and it stays where it is put by hand.

komorebic toggle-float takes the window that has the focus out of the layout, and the other windows of the workspace share the work area. The same command on a floating window puts it back in the layout, at the place of the focused window.

komorebic toggle-float

A floated window keeps its size and position by default. The floating windows of a workspace are in the daemon's state as floating_windows, next to its containers.

Windows that open floating

With the float override on, every window that opens floats instead of getting a tile. komorebic toggle-float-override turns it on and off for every workspace, and komorebic toggle-workspace-float-override for the focused workspace only: the first time it takes the opposite of what every workspace has, and from then on it follows its own setting.

komorebic toggle-float-override
komorebic toggle-workspace-float-override

The override is in the daemon's state, as float_override for every workspace and in each workspace that has one of its own.

The two layers

A workspace is on one of two layers: its tiles, or its floating windows. Which one decides what komorebic focus, cycle-focus, move and resize-edge act on. Floating a window puts the workspace on its floating layer, and giving the focus to a tiled window, with the pointer or a command, puts it back on its tiling layer. A window that opens and is tiled does the same, and so does putting a floating window back in the layout.

komorebic toggle-workspace-layer switches the layer by hand. The windows of the layer it goes to are raised in front of the others, and one of them is given the focus: the focused floating window, or the focused container's window. Going to the tiles hides the floating windows, and going back to the floating layer shows them.

komorebic toggle-workspace-layer

On the floating layer:

  • focus left, right, up and down give the focus to the nearest floating window on that side, by where KWin has them. When no floating window is on that side the focus goes to the monitor on that side, as it does for tiles, and the command fails where there is none: the daemon logs "there is no container or monitor in this direction".
  • cycle-focus next and previous go round the floating windows in the order they were floated, and wrap around.
  • move moves the focused floating window by the resize delta, 50 pixels unless it was set, and not out of the work area.
  • resize-edge and resize-axis change the frame of the focused floating window: increase on the left or the upper side moves it that way, and on the right or the lower side makes it wider or taller by twice the delta; decrease does the opposite.
  • preselect-direction does nothing.

komorebic toggle-maximize maximizes the focused floating window there, and when it is restored it is a tile, not a floating window.

The layer is layer in the state of each workspace, Tiling or Floating.