Commit Graph
2689 Commits
Author SHA1 Message Date
LGUG2Z 32b08d1b77 feat(nix): unknown_monitor, a window sent to no monitor must stay managed
The scenario sends the focused window to monitor 7 with send-to-monitor and
move-to-monitor, which no display has, and checks that the daemon still
manages every window. A port may refuse or ignore the command, but a window
that was managed has to stay so: one that is not is left on the screen with
nothing tiling it.

It found a bug in both ports. kfw managed one window fewer than the OS had
afterwards (seen by hand on a Windows guest), and kfde failed it in
core-e2e on a real KWin: move_container_to_monitor takes the focused
container out of its workspace before it looks the monitor up, so the
error for a monitor that is not there comes after the container is gone.
It is not fixed, so the scenario is not in core-e2e, which would fail;
BEHAVIOUR.md has the finding. Its unit tests run it against a fake that
loses the window and one that ignores the command.
2026-10-30 12:03:00 -07:00
LGUG2Z b22ae83e6a feat(nix): the command sweep plugs in a second display when it needs one
The sweep has commands that name the second monitor, send-to-monitor 1 and
the ones after it, so it needs two displays. The KDE suite runs with two
outputs and never noticed. On Windows, with one display, the first run of
the sweep reported that after send-to-monitor 1 kfw managed one window
fewer than the OS had, and every command after it was reported unhealthy;
whether that is kfw losing a window sent to a monitor that does not exist
has not been confirmed by hand. The sweep now plugs in a display first if
the platform has one, and a fake with one display shows it does.
2026-10-30 12:03:00 -07:00
LGUG2Z 631d8267f3 docs(repo): what the shared scenarios found on kfde and on kfw
A table of the scenarios against the two ports, with where each result
comes from, the resize finding and its cause (kfw reads the rectangle a
drag started from when it handles the start event, about 100 ms after the
drag began, so the distance it measures is short by what the window moved
in that time, and more so for a longer drag), what the scenarios had to
allow for, and what is not covered.
2026-10-30 12:03:00 -07:00
LGUG2Z 1c0bc9eae9 feat(nix): the commands, rules and hotplug scenarios, for every platform
commands is every layout, a sweep of 216 commands and the commands that
only print, each of which must be understood and leave the daemon healthy
(it answers state and manages the windows the OS has). A command the port
lacks, which komorebic says with 'unrecognized subcommand', is skipped with
its name, which is what a behaviour matrix is made of: Checks.skip records
it and finish prints how many. The commands suite runs it instead of its
own copy of the list: 270 checks pass, none skipped.

rules gives the daemon an initial rule, a rule that is not, and an ignore
rule, by title, and checks where each window goes. It found that
enforce-workspace-rules applies initial rules again on purpose, so the
scenario asks whether the daemon sends the window back on its own.

hotplug unplugs a display, plugs one in and sends a window to it, and
starts by plugging one in if the platform has only one. Platform gets
displays, add_display and remove_display, and KdePlatform does them with
kscreen-doctor. The hotplug suite runs it: 34 checks pass.

core-e2e runs rules after the others, then leaves a window for the stop to
leave behind: 130 checks pass on KVM. One run failed the check that the
daemon had exited after komorebic stop and the next did not; the cause is
not known, and the suite now prints the unit's status when it happens.
Snapshot.workspace_of tells which workspace has a window.
2026-10-30 12:03:00 -07:00
LGUG2Z d7ed89579e docs(repo): monocle and closing pass on Windows too
Seven of the eight shared scenarios pass on a Windows 11 guest under QEMU
against kfw's daemon, as the session that ran them reports. The eighth,
resize, ran there and found that the edge moves less than the pointer; an
unmanaged window followed the same drag exactly, so the shortfall is in
what kfw does with the drag.
2026-10-30 12:03:00 -07:00
LGUG2Z ed792445d0 feat(nix): the monocle and closing scenarios, and Platform.close
monocle toggles monocle on the focused window and checks that it fills the
work area up to the layout's padding, that the state has it as the monocle
container, that every other window is put away, that it keeps the focus,
and that toggling back puts every window in view on the tile it had.
closing closes a window and checks that the OS has no frame for it, that
the daemon manages one window fewer, and that the windows left in view
take more room between them, inside the work area and clear of each other.

Platform.close closes a window as its button would; KdePlatform does it
with kdotool. The fake daemon models monocle and closing, and its
os_window now knows the workspace a window is on, which the workspaces
scenario had passed without. core-e2e runs both: 120 checks pass on KVM.
2026-10-30 12:03:00 -07:00
LGUG2Z 37b75f8205 feat(nix): the resize scenario and a pointer on the Platform
Platform.has says whether a platform can do what a scenario needs, and
Platform.pointer is a Pointer (move, down, up, drag) where it has one;
KdePlatform takes the pointer of a session node. scenarios.resize drags the
edge two tiles share by 60 pixels and checks that the tiles that end at the
edge are that much wider, the ones that start after it start that much
later and end where they did, nothing moves up or down, and tiles that do
not touch the edge are where they were. A platform with no pointer skips
it, and says so.

The fake daemon has a pointer that moves an edge. The scenario runs on KDE
at the end of drag-resize: 19 checks pass on KVM. Its first run failed one
check that was the scenario's: both tiles of a BSP column share the dragged
edge, and the check took the second for one that had not moved.
2026-10-30 12:03:00 -07:00
LGUG2Z e385bace05 test(nix): Snapshot against states recorded from both ports
core-e2e writes the komorebic state of kfde, with three tiled windows and
with one stacked onto another, into its output, and the files are kept in
tests/fixtures beside kfw's three, recorded from a Windows guest (tiled,
stacked, one window floated). test_recorded.py reads all five with the
same checks: three containers of one window, a layout rectangle for each
inside the work area, each window where its container's rectangle is up to
a terminal cell (foot rounds to cells, kfw's test window does not), and a
stack that is a container of two whose focused window is the one the ring
names. Nothing in the parser had to change; the checks passed on the first
real kfw state.

The scenes written from the serializers stay for the shapes no run has
recorded. The sync script copies the fixtures too. The workspaces scenario
prints which windows are in view after the switch: one run of core-e2e
failed that check and passed on the next, and the log did not say which
window had been in view.
2026-10-30 12:03:00 -07:00
LGUG2Z 22a5dbdb32 docs(repo): the shared scenarios run on two platforms
tiling has run against kfw's daemon on a Windows 11 guest under QEMU, 10 of
10 checks, with this core copied unchanged; the other four scenarios have
not run there yet. Says so in vm-tests.md, and what keeps the copy in
step.
2026-10-30 12:02:55 -07:00
LGUG2Z 030e580a49 build(repo): sync the neutral core to kfw while it is on its way there
scripts/sync-e2e-core copies komorebi_vm.core and the unit tests that
belong to it into another directory, and --check says whether the copy is
in step, so that kfw's Windows platform can be written against the code it
will run with while the move is not made. This repository is the source
until the move, and the script goes with it.

Two of those tests imported Rect and Checks from komorebi_vm, which pulls
in the KDE half; they import them from komorebi_vm.core now. The copy
passes its 25 tests in a directory with nothing but pytest and Pillow.
2026-10-30 12:02:55 -07:00
LGUG2Z c59f5dddd0 build(nix): scale of 1.5 on every Linux host, and what the suites take on WSL 2
latency measured a p95 of 128.9 ms against its 100 ms times scale on the
WSL2 machine, under nested KVM with nothing else running, where x86-1 had
passed it at scale 1. Every Linux host is no faster than a Mac to the
suites that time the daemon, so scale is 1.5 on all of them: latency
passes at it with a p95 of 132.4 ms against 150 ms. The run-to-run
difference (p50 46.0 ms, then 70.0) is as large as the margin left, which
PLATFORM.md says.

PLATFORM.md records the wall times of the suites on this machine. All 33
were run there after the library was split: 32 passed at scale 1, and
latency is the one that failed. The other 32 were not rerun at 1.5, which
changes their derivations.
2026-10-30 12:02:55 -07:00
LGUG2Z 875a9ef41d feat(nix): the workspaces scenario, for every platform
workspaces sends the focused window to workspace 1, checks that it is put
away and that the daemon has it there while the others stay in view,
switches to workspace 1 and checks that only that window is in view and has
the focus, and switches back.

hidden now says a window is out of sight for any reason the daemon has: on
KDE that is the parking desktop and also a desktop that is not the one in
view. Snapshot's workspace, containers and focused_title take the focused
workspace when none is given, and the fake daemon has two workspaces. The
scenario passes in core-e2e on KVM: 106 checks.
2026-10-30 12:02:55 -07:00
LGUG2Z e3cc27035a docs(repo): how to write a scenario for every platform 2026-10-30 12:02:55 -07:00
LGUG2Z 0f73ba3a55 feat(nix): the stacks scenario, and Platform.hidden
hidden says that a window exists but the daemon has put it away: the others
of a stack, here, and later those of another workspace or behind a monocle.
It is a window on the parking desktop on KDE and will be a cloaked one on
Windows. scenarios.stacks stacks the focused window onto its neighbor,
cycles the stack, checks that the window in view has the focus and fills
the tile the first had, and takes the stack apart.

The scenario's fake daemon now models stacks. Running it on KDE found a bug
in Snapshot: focused_title took the first window of the focused container,
and a stack's focused window is the one its ring names. Snapshot keeps that
index now. core-e2e runs the scenario after the others: 98 checks pass on
KVM.
2026-10-30 12:02:55 -07:00
LGUG2Z c861f4f789 feat(nix): the focus and moving scenarios, for every platform
focus moves the focus with focus and cycle-focus and checks that the OS and
the daemon's state agree on the window that has it and that no window moved.
moving swaps the focused window with its neighbor with move and puts every
window back with cycle-move, and checks that the focus stays with it. Both
read the windows through the Platform, so they are what kfw's suite will
run.

Their unit tests run against a fake daemon that follows the commands over
three tiles, and against two that do not (a move that moves nothing, a move
that loses the focus). core-e2e runs them after tiling on KDE: 85 checks
pass on KVM.
2026-10-30 12:02:55 -07:00
LGUG2Z bb8299410f feat(nix): KDE as a Platform, and the tiling scenario in core-e2e
KdePlatform is a Kde session seen through the neutral vocabulary: kdotool
for the OS's frames, foot for clients, the cell of its font as the
tolerance. The core-e2e suite runs scenarios.tiling through it as a new
section, so that the scenario that will run on Windows is checked on the
one platform that works; the suite's own sections are unchanged. It passes
on KVM (74 checks) on the WSL2 machine.
2026-10-30 12:02:55 -07:00
LGUG2Z 2c5e8f57dc feat(nix): the Platform protocol and the first neutral scenario
A scenario drives the daemon and looks at the desktop only through a
Platform: start the daemon, komorebic, state as a Snapshot, spawn a window,
os_window (the OS's own account of its frame, which is the oracle: the
daemon's state is what is under test), work_area, activate and screenshot.
Only what a scenario uses is there; a method is added with the first
scenario that needs it.

scenarios.tiling opens windows and checks, against the OS's frames, that
each is where the layout says, inside the work area and clear of the
others. Its tests run it against a fake platform that tiles correctly and
against two that do not.
2026-10-30 12:02:55 -07:00
LGUG2Z b02df47e34 feat(nix): Snapshot, the daemon's state in one shape for every port
komorebic state prints a different JSON on kfde and on kfw: a window is
{id, rect, details} on one and {hwnd, title, exe, class, rect} on the
other, and a monitor and the state itself have fields the other lacks.
core.snapshot.parse reads either into monitors, workspaces, containers and
windows with the same names, keeping what only one has in Snapshot.extra,
so that a scenario does not have to care which port it runs on.

The fixtures in its tests are written from the two serializers, not
recorded; they are replaced by recorded states once a run on each port
exists.
2026-10-30 12:02:55 -07:00
LGUG2Z a37a9faf3d refactor(nix): a platform-neutral core in the VM library
Checks, Rect and the pixel helpers depend on no compositor. They move to
komorebi_vm.core, which may not import komorebi_vm.kde, so that the package
can go to the Windows port unchanged. komorebi_vm re-exports them and no
suite changes. This is the first step of the cross-platform e2e plan.
2026-10-30 12:02:55 -07:00
LGUG2Z 9a58e5117a docs(pan): document panning the scrolling layout 2026-10-29 16:38:53 -07:00
LGUG2Z 8d3ed68937 fix(resize): send a window again that did not land after a drag 2026-10-29 16:38:53 -07:00
LGUG2Z 60170fc3e8 fix(resize): lay windows out in place for the commands that resize them 2026-10-29 16:38:53 -07:00
LGUG2Z 2443bac4d4 feat(pan): follow fingers on a touchpad with komorebic pan --stream 2026-10-29 16:38:53 -07:00
LGUG2Z 7fa575d4b1 feat(pan): move the strip of the scrolling layout a step at a time 2026-10-29 16:38:53 -07:00
LGUG2Z eed18e365b chore(deps): bump komorebi-layouts and komorebi-themes to the scrolling pan branch 2026-10-29 16:38:53 -07:00
LGUG2Z e616b48c84 docs(nix): regenerate options
feat(animation): slide workspaces in and out added a workspace entry to
the duration, enabled and style options of animations in schema.json,
but not to nix/komorebi-options.nix. Add them. Nothing else in the
generated files is out of date at this point of the stack, and the
commits above it carry the same nix file.

schemars-nixgen writes the options of an object in a different order on
every run, so the file keeps its order and gets only the new options. The
lines of the result, sorted, are the lines of a fresh run, sorted.
2026-10-29 16:38:53 -07:00
LGUG2Z 612f34f311 feat(animation): slide workspaces in and out
Add a workspace animation kind. When focus-workspace switches workspaces on a
monitor, pictures of the windows that leave slide out and pictures of the
windows that arrive slide in, on an overlay of Core Animation layers. The real
windows are put away or kept waiting behind them, and the ones that arrive are
restored where the pictures end up, which fade away over them.
2026-10-29 16:38:53 -07:00
LGUG2Z 21036fa28b feat(resize): let the windows next to a dragged edge follow it
Dragging the edge of a window only resized its neighbours once the
button went up. They now follow the edge while it is dragged.

The window that is dragged says that it moved, and one such step waits
at most, so that the channel is not filled with the ones that come
faster than they are handled. What is laid out for a step is worked out
from the workspace as it was when the edge was taken hold of, and not
from the step before, so a drag ends the same with its steps as without
them and one that is taken back puts the neighbours back. The neighbours
are written straight into place and not animated, a window that would be
sent where it already is is left alone, and no window is asked what it
turned out to be, since one that has not settled would say that it is
wider than it will be. The apps of the neighbours are only waited for a
quarter of a second for as long as the drag lasts.

The neighbours say that they were resized, with the button down, which
would be taken for somebody dragging them, so that is dropped where it
is heard, before anything is asked of an app. That is only for as long
as the button is down, and a drag whose end was never seen, as with a
tap that was turned off, is forgotten by the next thing that is heard.
The end of a drag that was followed is the end of that drag whichever
window the event is about, and a left or top edge, which moves the
window too, is not read as a move.

A drag is now measured from the tile for an edge that has moved, when it
was seen no more than 64 pixels from it, where it used to be only for an
edge more than 32 from it, so a drag of a few pixels no longer starts
from where the window had got to. An edge that did not move is left as
it was read.

Resizing a column by its left edge pans the strip to keep the right edge
where it was, and only for the column that the strip has as active, so
the strip is made to agree about which that is first.
2026-10-29 16:38:53 -07:00
LGUG2Z 200ee3104d chore(deps): bump komorebi-layouts and komorebi-themes to the live resize branch
Both move from c6a780c to 424a937, the tip of the upstream branch that
resizes by dragging an edge with the neighbours following. The
komorebi-scrolling crate has no pin of its own and moves with
komorebi-layouts, so the three stay in step.

What changes for us is in the scrolling layout and its model. Resizing
a column by its left edge now moves that edge and pans the strip so the
right edge stays where it was, where it used to grow the column to the
right. A column counts as in view when it is within a pixel of the edge
of the screen, and filling the available width rounds down. There are
no changes to the API that komorebi calls.

That commit is on a branch that is not merged and has been rewritten
before, so this is to be moved to the SHA on master once it lands.
2026-10-29 16:38:53 -07:00
LGUG2Z 00faad73bf feat(scrolling): toggle a column between several slots and one stack
toggle-column-stack stacks the windows of the focused column in one
window slot, or spreads the focused stack out into a column with a
window in each slot, whichever the focused column is. A stack is what
a tabbed column already is, so this is the same thing seen from the
other side: existing stacks stay stacks, consume and expel make split
columns, and this switches either kind.

Stacking keeps the order of the windows and the one that had focus is
the one that shows. Spreading out puts the tabs in the order of the
tabs, with focus on the window that had it, and puts every window that
was out of sight where it is shown, the one that stays in its slot as
much as the ones that go to slots of their own. Focus stays on the
column while that is done, so that stacking and spreading out again
leaves the strip where it was. The column keeps its width. Heights that
its slots were given are not remembered for toggling back, which needs
more memory than a column keeps.

The stack is the stack of every layout, so cycle-stack, focus-stack-
window and stack work on it, and unstack takes the window that has
focus off into a column of its own to the right, which a test checks.

Like consume and expel it only does anything in the Scrolling layout.
The parking and restoring of windows is the code that stacks already
use, and was not seen on a screen. A test has no screen, so what would
be restored is recorded, and two tests check that every window of a
spread out stack is and that the strip stays put.
2026-10-29 16:38:53 -07:00
LGUG2Z 2363ff6c3a feat(workspace): keep the width of a window that moves to another workspace
A container goes from one workspace to another by being taken out of
one and put into the other, with nothing between them that both could
be asked, so a window that was moved started again with the default
width, as did one moved to another monitor.

Taking a container out of a workspace now says what its column was
given, which komorebi_layouts::scrolling keeps, and the strip of the
workspace that has the container next finds it there the first time it
sees it, before it is made to match the list. So the window is a column
of its own as wide as the column it left, whichever way it got there,
and a window that moves on takes what it has where it is. Nothing is
remembered for a container that no strip had been asked about.
2026-10-29 16:38:53 -07:00
LGUG2Z 767af481fd fix(input_event_listener): turn the event tap back on and make it again
The tap that sees clicks and key presses for the reaper and for the end
of a drag was never looked after. The system turns a tap off when it is
too slow to answer and tells the callback with an event that is not an
event, which was treated as a click, and a tap that did not survive
sleep was never missed. Either way komorebi stopped noticing windows
that close without a notification and drags that end without one, with
nothing in the log.

The callback now only says that it was turned off, since anything slow
done there is what gets a tap turned off, and the main loop turns it on
again at once. Every five seconds it also asks whether the tap is there
and on, turns it on or makes it again as the answer says, and tries to
make one if there never was one, since the permission may have been
granted since. Not being able to make the tap is logged, once.

The decision is a function of two booleans with tests. That the system
really does disable the tap, and what sleep does to it, is not something
that was seen on a device.
2026-10-29 16:38:53 -07:00
LGUG2Z e23dc085f9 feat(scrolling): resize the heights of windows in a column
The heights that the model can give the tiles of a column are now
reachable. Resizing a vertical edge makes the focused window taller or
shorter by half of the resize delta, as a horizontal edge does for a
column, and the others in its column share what it leaves. No window is
made shorter than 100 pixels, and retile puts heights back as well as
widths.

A window that is alone in its column fills it, so all of this does
nothing for it, and the other layouts are not affected.
2026-10-29 16:38:53 -07:00
LGUG2Z 5d78b22a8b feat(scrolling): put several windows in a column of the scrolling layout
The strip's tiles are the workspace's containers, in the order of the
list, so a column is a run of the list and every container still gets
one rectangle: the layout pass, latest_layout, drag and the borders are
as they were. Everything that changes the order of the containers does
it on the list, and the strip is made to match on the next pass.

- consume left|right and expel make and unmake columns of several
  windows, and only do anything in the Scrolling layout for now
- focus left and right go to the neighbouring column and to the window
  in it that had focus last, and up and down go between the windows of
  the column and carry on to another monitor at the ends, as before
- move left and right move the whole column, and up and down swap the
  window with the one above or below it, past which the list changes
- a new window goes after the last window of the focused column and
  not after the focused window, so that it is a column of its own and
  does not split the one it was opened next to
- the strip is no longer thrown away when the layout is not Scrolling,
  so that widths come back when it is again

Heights are equal and there is no command to change them yet. A window
that is moved to another workspace or monitor starts again with the
default width.
2026-10-29 16:38:53 -07:00
LGUG2Z ebc9d49d77 feat(scrolling): make room for windows that will not get as narrow
Many apps will not make a window narrower than some width. The layout
placed the next column as if the window had the width it was given, and
so placed it on top of the window that had not.

What the arrival module has been told, the layout picks up at the start
of the next pass: a column is never narrower than the window in it
needs, plus the padding and border around it and capped at the width of
the screen, and the columns after it are placed where it ends. A limit
only ever goes up, so that a column does not bounce between two widths,
and a stack takes the widest of its windows.

With animations off the layout asks every window that it resized what
it is, with a timeout, and places everything once more if one refused.
With animations on the animator says so when a journey ends, so a
window that refuses is noticed then as well.
2026-10-29 16:38:53 -07:00
LGUG2Z b496bd8858 feat(scrolling): add full-width, expand and center-focus commands
The model could take the full width, fill the room that the columns in
view leave, and centre a column, but nothing called it. These commands
do, the first in the scrolling-layout family that
scrolling-layout-columns started, and the others named plainly,
center-focus to match promote-focus:

- scrolling-layout-full-width
- expand
- center-focus

Each is about the container that has focus now, even if focus moved
since the last layout, and does nothing until there is a strip, or in
another layout. A column made the full width of the screen takes the
gaps into account, so that it fills the screen exactly. expand makes the
focused column as wide as it can be without moving another column out of
view, which is the full width of the screen when it is the only one in
view or when the focused column is always centred, and does nothing when
there is no room.

Nothing changes in the shared layouts crate, so Windows is not affected.
2026-10-29 16:38:53 -07:00
LGUG2Z 2fb9dfdffa feat(workspace): make retile put the widths of scrolling columns back
retile already forgot the resize adjustments of the layouts that are
made of splits, and the widths of the columns of the Scrolling layout
are the same kind of thing. The focused workspace of each monitor
gets its columns back to what scrolling-layout-columns gives, and the
focused column stays where it is unless it has to scroll.

The variant of retile that keeps resize dimensions keeps the widths.
2026-10-29 16:38:53 -07:00
LGUG2Z 65265c95f3 fix(window): hide windows on the display of the monitor that has them
A window whose top-left corner is past the left edge of the screen is
on no display, as far as CGGetDisplaysWithPoint is concerned. Looking
the display up from the corner then found nothing, and hide, the
scrolling rest and the slide back in all skipped the window without a
word. The Scrolling layout lets a column overhang the left edge, so a
column that scrolled out of view that way stayed on screen, and so did
a window of a workspace that was left while it overhung.

A workspace now takes the display from its monitor and hands it down
to Container::hide and Window::hide_on, and arrange_scrolling hands
it to hide_scrolling. A window that is parked remembers the display it
was parked on, so sliding it back in no longer looks at its target.

The lookup by position stays for callers that have no monitor, and is
total: the display under the corner when there is one, otherwise the
display with the most overlap, otherwise the nearest, and the main
display when the system reports none. Not finding a display to hide a
window on is logged as a warning, and which rest a window gets is
logged at trace.
2026-10-29 16:38:53 -07:00
LGUG2Z acc4d7d67a docs(repo): describe the scrolling layout
Add a page on the Scrolling layout: how column widths work, when the
screen scrolls, what closing a window focuses, how resizing works, where
windows that are out of view go and why, and what is not done yet.
2026-10-29 16:38:24 -07:00
LGUG2Z d9319e0f66 docs(komorebic): say what scrolling-layout-columns means
The Scrolling layout no longer shares the screen between however many
windows there are until `columns` of them exist. The count is how many
columns fit across the screen, which is how wide a new column is, so the
help says that, and not that it is the number of visible columns.
2026-10-29 16:38:24 -07:00
LGUG2Z 8c4949e405 feat(scrolling): choose what has focus after a window is closed
Closing a window moved focus to the container on its left, whatever had
focus and wherever the window was. A strip of columns knows better.

Focus goes back to the column that the closed one was opened next to,
with the viewport as it was, if nothing has moved focus since. Otherwise
it goes to the column that takes the closed one's place on the right. A
window that is closed without having focus no longer takes focus with
it.

The strip is told what there is just before the container goes, so that
it can answer. A workspace that has not laid out a strip yet moves focus
left as before.
2026-10-29 16:38:24 -07:00
LGUG2Z 0aa97042a3 feat(window): rest windows that scroll out of view at the edge
A window that scrolled out of view in the Scrolling layout used to be sent
to a corner of the screen and hidden there. It now comes to rest at the
edge of the screen that it left by, with a sliver of it on screen, and
keeps its size and its height up the screen. Bringing it back is then a
matter of moving it, and it never has to be resized.

With animations on the window slides there and stays, where it used to
carry on into the corner. With animations off it is moved there at once,
so the layout behaves the same either way. Where the edge is next to
another display, and the window would be seen on it, it is still hidden
in the corner.

The marker that says a window is out of the way is now also cleared when
a window is put back without animating it. Only sliding a window in
cleared it, which was enough only while nothing set the marker unless
animations were on.
2026-10-29 16:38:24 -07:00
LGUG2Z 03cb86d507 feat(scrolling): lay out the scrolling layout with the scrolling model
The Scrolling layout is now laid out by komorebi-scrolling instead of by
the layouts crate. A workspace in that layout keeps a ScrollingSpace next
to its containers, makes it match the containers and the focus whenever
the layout is calculated, and takes the rectangles from it. As a result:

- a window that opens gets the width of a column and no other column
  changes width, where every column used to be resized to share the
  viewport until there were as many as `columns`
- focusing a column that is already in view does not scroll the strip
- a column that has been resized keeps its width as windows come and go
- columns that were never resized follow the `columns` option, so
  changing it, or crossing a threshold of layout_options_rules, still
  lays them out again

Resizing changes the width of the focused column, by half of the delta
per edge as the other layouts do. A strip has no heights, so resizing a
height does nothing.

Windows that are partly in view keep their size and overhang the edge of
the screen, unless that would show them on another display, where they
are clamped to the work area as before.

What needs a Workspace is in the scrolling module, and what does not is
in komorebi_layouts::scrolling, which the model comes through. What only
the old Scrolling layout needed goes: the percentage override in
update(), laying the strip out again without resize adjustments in
hide(), the resize constraints, and the feedback of the unclamped
layout.
2026-10-29 16:38:24 -07:00
LGUG2Z bc962167b7 chore(deps): bump komorebi-layouts for the scrolling model
komorebi-layouts now carries the platform-free half of the Scrolling
layout: the model of a strip of columns, re-exported as
komorebi_layouts::scrolling::model, and what a host needs around it,
which is the layout options for the model, the placement of containers
in a work area, resizing a column or a tile, and the hand-over of column
records between workspaces.

The center_focused_column layout option of the Scrolling layout is one
of Never, Always and OnOverflow there, and a boolean is still read as
true for Always and false for Never. The two places here that said true
say Always, and the schema and the options for nix say so.

This is the revision of the feature/moar-scrolling branch of komorebi
that has them. It is pinned by revision until the branch is merged, and
komorebi-themes moves with it so that the repository is fetched once.
komorebi-scrolling has no license field, so deny.toml clarifies it as it
does the other crates of that repository.
2026-10-29 16:38:24 -07:00
LGUG2Z 0fb5de3c0e fix(workspace): make scrolling-layout-columns work with other options
The command only set the column count when the workspace had no layout
options at all, or already had scrolling options. A workspace with
options for something else (column_ratios, say) and no scrolling options
matched the second arm and was left unchanged, so the command silently
did nothing.

Move the logic to Workspace::set_scrolling_columns, which creates the
scrolling options when they are missing and keeps every other option,
and test all three cases.
2026-10-29 16:38:24 -07:00
LGUG2Z 1098dfc6ec fix(workspace): keep the scrolling view put while focus moves within it
The Scrolling layout works out which column is first in view from the
layout it produced last time. Workspace::update stored that layout after
clamping it to the work area, which pulls every off-screen column onto
the left edge, so the previous view always read as starting at column 0.
Once more windows were open than fit on screen, focusing left shifted the
whole strip by a column on every step instead of leaving it where it was.

Keep the layout as the algorithm produced it and feed that back for
Scrolling, both in Workspace::update and in resize_window. The clamp
becomes a function of its own so that the regression test runs the same
code as update().
2026-10-29 16:38:24 -07:00
LGUG2Z 253600966b feat(animation): say where windows really ended up
An app is free to refuse a size, and many do: a window that will not get
narrower than some width stays that wide however it is asked. The animator is
the first to find out, when it looks at a window after a journey, and until now
it only re-sent the size and moved on, so a layout that places the next column
as if the window had the width it was given places it on top of the window that
did not.

The arrival module is new here. It is where whatever finds out that a window is
wider than it was told to be says so, from any thread and without the lock of
the window manager, for a layout to pick up the next time that it runs.

Say what every verification found to it, which keeps the windows that
turned out wider than they were told to be for the layout to pick up, and
forgets those that have taken their size since, so it is said every time and
whatever the answer. That includes the last attempt, where the window is looked
at again after it was last told to take its size, as nothing verifies it after
that and the attempts are given up on.

This is said from where the frame is read, not carried out of the state machine,
which has no business with anything global.
2026-10-29 16:38:24 -07:00
LGUG2Z 0af7b0fcf7 fix(animation): treat every journey that ended before it settled as cut short
take_unfinished only knew about a journey that was to go on to somewhere else
afterwards and never got there. A window that slides out of view in the
Scrolling layout rests where it slid to and has nowhere to go afterwards, so a
slide that was cut short went unnoticed, and the window was left partly in view.

Count every journey that ends other than by the window being found where it was
sent: one that was grabbed or taken over, given up on because the app stopped
answering or the window was gone, or that never got to where it was sent in the
verifications that follow. A journey that settles is not cut short, and nobody
has to ask for the news to be kept within bounds.
2026-10-29 16:38:24 -07:00
LGUG2Z 86adb69bd3 docs(animation): describe how to use animations
Describe the duration, style and fps options, per-animation settings, and what
to expect from the animator: windows stay in step with each other, apps that are
slow to resize are sent sizes less often, and a window that is grabbed is let
go of.
2026-10-29 16:38:24 -07:00
LGUG2Z bc4dc76f39 feat(window): slide windows in the Scrolling layout out of view and back
Windows that scroll out of view were hidden with an instant jump to a corner of
the screen, and animated back in diagonally across it. With animations on, slide
them out sideways to the edge of the screen they left by, at the same height,
and park them in the corner once they are out of sight; and put a parked window
back at that edge before it slides in, so that it comes from where it left.
Windows that would be seen on a neighbouring display on the way fall back to the
instant hide, and a window that is stopped on its way out is hidden again rather
than left in view.

Without animations nothing changes.
2026-10-29 16:38:24 -07:00