Files
komorebi/docs/usage/changing-monitors.md
T
LGUG2Z c8dc92a236 feat(wm): a monitor changes size
When an output gets another resolution or scale, or a panel starts, grows or
hides, the work area the layout fills is not the one komorebi tiled in, and
nothing moved the windows until something else tiled them again.

The bridge now sends the outputs, with their geometry and the work area of the
desktop each shows, when KWin says they changed, when a dock window opens,
closes or moves, and once a second, because KWin has no signal for the room a
panel leaves. The table turns a monitor whose size or work area changed into a
monitor notification. It is not a window event, since it is about no window: it
goes to the monitor reconciliator, a thread that takes the window manager's lock
as the threads of events and messages do, reads the size and work area of every
monitor again and tiles the workspace in front of the focused monitor. Another
monitor's windows keep their tiles until a retile. Every subscriber is notified
of it, whether or not the state changed.

vm-hotplug starts with the scale of one of two outputs changing under a running
daemon. The VM library gets kde.outputs, which lists, disables, enables and
scales outputs, for the commits that unplug and plug them.
2026-10-28 07:20:57 -07:00

1.4 KiB

Monitors that change

komorebi follows the outputs KWin has. There is nothing to configure and no command to run: this page says what komorebi does when a monitor changes.

A monitor changes size

A monitor changes size when its resolution or its scale changes (in System Settings, under Display & Monitor, or with kscreen-doctor output.<name>.scale.1.5), and when a panel changes the room the windows have on it: a panel that starts, grows, moves or is hidden. komorebi reads the size and the work area of every monitor again, and tiles the workspace in front on the focused monitor in the area it now has.

The windows of the other monitors keep their tiles until something tiles them again. komorebic retile does it for every monitor.

KWin has no signal for the room a panel leaves, so komorebi looks at it when a panel opens, closes or moves, and once a second. A panel that is laid out a moment after komorebi starts is found within a second.

A monitor that is unplugged or plugged in is not followed: komorebi keeps the monitors it started with until it is started again.

Following it from a program

A subscriber is sent a notification each time komorebi has read the monitors again, whether or not anything changed in the state. Its event is {"Resize":0}, where the number is the id of the monitor that changed, or 0 when KWin does not say which.