mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-30 12:14:10 +01:00
feat(record): sample every window's rect at video rate, and draw them on sheets
record --window-track[=HZ] (off by default, 30 Hz without a value, 1..=120) writes windows.jsonl: a sampler thread lists every top-level window once per tick and writes the full window list only when something changed, plus a keyframe each second, so a still desktop costs about a row a second. platform::window::list gives generic facts (Windows: EnumWindows + DWM cloaked/frame bounds; macOS: CGWindowList bounds and on-screen flag). The manifest records the track (rows, late ticks) and warns if it stopped or fell behind. Analysis::window_track answers 'windows at mach_ns T', and sheet --windows draws each window's rect and label on every frame (cloaked windows dim), or notes that the session has no track. The macOS part (platform/macos/apps.rs window_list) was written against the objc2 sources and is NOT built or run: this was developed on Windows.
This commit is contained in:
1 parent
6af9eabd27
commit
3c4f352846
21 files changed
+1293
-2
No files matched your search
@@ -118,7 +118,7 @@ and `event:12.end` when it finished.
|
||||
| `logq QUERY` | Query komorebi's log by field, with no escape codes or span prefixes to strip: `level=ERROR and message~ghost`, `hwnd=0x77179C` (decimal and hex are the same window), `command=MoveWindow`; `--count`, `--group-by FIELD`, `--from`/`--to`, `--spans` |
|
||||
| `search TEXT` | Where a word appears: komorebi's log, events, incidents, annotations (and `--oslog` for the macOS trace) |
|
||||
| `changes` | When and where on each display the picture changed, and which events fall inside |
|
||||
| `sheet` | A contact sheet image of frames with times, events and the bug region marked |
|
||||
| `sheet` | A contact sheet image of frames with times, events and the bug region marked; `--windows` also draws each window's rect on the frames when the session has a window track |
|
||||
| `motion [--region x,y,w,h]` | When, and how hard, a display or a region of it was moving: segments with start, duration, frame count, peak share of pixels changed and peak mean brightness delta (replaces scripting ffmpeg `tblend`) |
|
||||
| `framediff A B [--region ..] [--png FILE] [--against SESSION]` | How two frames differ: changed share, mean and peak brightness delta, the box of change, and a PNG with the changed pixels in red |
|
||||
| `blank --region x,y,w,h` | When a region was blank (one colour, named: `white`, `black`, a hex code) or frozen (identical to the frame before): "the window went white for 200 ms" |
|
||||
|
||||
@@ -92,6 +92,7 @@ Useful options:
|
||||
| `--oslog-all` | One extra unfiltered system-wide stream (very large) |
|
||||
| `--no-oslog`, `--no-komorebi` | Skip the OS trace, or skip touching komorebi entirely |
|
||||
| `--no-video` | Do not capture the screen; record everything else on the same clock (see below) |
|
||||
| `--window-track[=HZ]` | Also sample every window's rect and state alongside the video (30 Hz by default, 1 to 120; see below) |
|
||||
| `--no-probe-windows` | Windows: do not record what Windows says about each window event, which is on by default (see below) |
|
||||
| `--fps N`, `--retina`, `--codec hevc\|h264` | Video settings (display-rate capture (`--fps 0`, the default; N caps it), logical points, HEVC by default) |
|
||||
|
||||
@@ -126,6 +127,19 @@ those facts. `--no-probe-windows` turns it off, and without it `overview` cannot
|
||||
really hidden, nor find a ghost tile. It does nothing on a Mac, where a hidden window is parked in a
|
||||
corner and the state says so, and asking for `--probe-windows` there is an error.
|
||||
|
||||
### Tracking where every window is
|
||||
|
||||
The per-event probe above says what one window looked like when something happened. The recurring
|
||||
question is different: _which window was where, in this frame_. `record --window-track` (or
|
||||
`--window-track=60`) lists every top-level window many times a second, with its rect, whether it is
|
||||
visible or minimized and, on Windows, whether it is cloaked, front to back, into `windows.jsonl`. A
|
||||
row is written only when something changed, plus a full row each second, so a still desktop costs
|
||||
about one row a second and a busy one a few kilobytes a second. The recorder's own windows and tool
|
||||
windows (tooltips, toasts) are left out. It is off unless asked for. `komorebi-recorder sheet
|
||||
<session> --windows` then draws each window's rect, labelled with its program and id, on every
|
||||
frame of the sheet; a session with no track says so and gets a plain sheet. A recording that cannot
|
||||
keep the rate says so in its warnings.
|
||||
|
||||
### Checking your setup
|
||||
|
||||
```
|
||||
@@ -223,6 +237,7 @@ frames-<displayID>[-<n>].csv every frame's host-clock timestamp
|
||||
komorebi.log exact slice of komorebi's own log
|
||||
events.jsonl, states/ subscriber notifications; full State stored only when it changed
|
||||
state-start.json, state-end.json
|
||||
windows.jsonl window track (only with --window-track): every window's rect, on change and once a second
|
||||
recorder.jsonl what happened to the recording environment (displays, sleep/wake, lock, restarts)
|
||||
annotations.jsonl bug regions, notes and findings (appended, never rewritten)
|
||||
oslog/komorebi.ndjson unified log, komorebi's process (oslog/komorebi-<pid>.ndjson after a restart)
|
||||
|
||||
Reference in new issue
Block a user