Files
komorebi/docs/usage/padding-and-offsets.md
T
LGUG2Z ac265de1e3 feat(wm): padding for named workspaces
workspace-padding and container-padding take the index of a workspace's monitor
and its own index, so a script that names its workspaces still has to count them
to pad one, while focus-named-workspace, named-workspace-layout and
named-workspace-tiling already take the name.

named-workspace-padding and named-workspace-container-padding take the name
instead. They look the workspace up on every monitor the way the other named
commands do, set the same padding the commands by index set, and change nothing
for a name no workspace has.

The tests check the messages the subcommands send, that a named workspace takes
its paddings and the tile in front follows, and that a name nobody has changes
nothing. The commands sweep of the VM suite sends both commands to a real
session.
2026-10-28 07:20:37 -07:00

3.9 KiB

Padding and work area offsets

komorebi tiles the windows of a workspace in the work area of its monitor, which is the part of the monitor that KWin reports free of Plasma's panels. Padding puts gaps around the tiles, and an offset keeps a part of the work area free of tiles.

Padding

A workspace has two paddings, in pixels:

  • the workspace padding, between the edges of the work area and the tiles;
  • the container padding, around each tile, so that two tiles side by side are twice that far apart.

A workspace that has no padding of its own takes 5 pixels for each.

komorebic focused-workspace-padding and komorebic focused-workspace-container-padding set the paddings of the focused workspace, and komorebic workspace-padding and komorebic container-padding those of a workspace given by the index of its monitor and its own, counted from 0.

komorebic named-workspace-padding and komorebic named-workspace-container-padding find the workspace by the name it was given instead, on whichever monitor has it. A name no workspace has changes nothing.

komorebic focused-workspace-padding 20
komorebic focused-workspace-container-padding 10
komorebic workspace-padding 0 1 0
komorebic container-padding 0 1 0
komorebic named-workspace-padding mail 0
komorebic named-workspace-container-padding mail 0

komorebic adjust-workspace-padding and komorebic adjust-container-padding make a padding of the focused workspace larger or smaller by a number of pixels. They change a padding the workspace has of its own, set by one of the commands above: on a workspace that has none, the daemon logs "there is no workspace padding" or "there is no container padding". A padding is not made smaller than 0.

komorebic adjust-workspace-padding increase 5
komorebic adjust-container-padding decrease 5

Work area offsets

An offset is four numbers. The first two move the top left corner of the work area right and down; the last two make the work area narrower and shorter. So 0 40 0 40 keeps a strip of 40 pixels at the top free, 0 0 0 40 a strip at the bottom, and 40 0 40 0 a strip on the left.

komorebic global-work-area-offset sets the offset of every monitor, komorebic monitor-work-area-offset the offset of one monitor, which it takes instead of the global one, and komorebic workspace-work-area-offset the offset of one workspace, which it takes instead of both. Each tiles every monitor again, as komorebic retile does.

komorebic global-work-area-offset 0 40 0 40
komorebic monitor-work-area-offset 1 0 0 0 40
komorebic workspace-work-area-offset 0 2 40 0 40 0

A monitor can also have a window-based offset, which applies on top of the other one while the workspace in front has no more windows than the monitor's limit, 1 unless it is given another. With a window-based offset, a window that is alone on a wide monitor does not have to take its whole width. No command sets a monitor's window-based offset: it is part of the configuration of a monitor. komorebic toggle-window-based-work-area-offset turns it off for the focused workspace, and on again.

komorebic toggle-window-based-work-area-offset

The daemon's state has the offsets as work_area_offset (of the window manager, of each monitor and of each workspace), and a monitor's window-based offset and limit as window_based_work_area_offset and window_based_work_area_offset_limit.