ada53b090ed705a4353c9db19b970bddd0eb6aa3
* Anchor the webcam overlay to the recorded region, not the monitor Recording a single window on an ultrawide put the camera outside the frame. The overlay is placed twice, and neither placement knows what is being captured: the window rules in default/hypr/apps/webcam-overlay.lua position it from monitor_w/monitor_h, and omarchy-capture-webcam-resize recomputes the same corner from hyprctl monitors. Both resolve to the monitor's bottom-right, so a window anywhere but the far right of the display records without the camera in it, and dragging it into frame by hand is undone by the next resize. The geometry is already known. select_capture_target resolves the picked window to a region rectangle before start_webcam_overlay runs, and a bare click in smart mode snaps that rectangle to the window's own bounds. gpu-screen-recorder takes the region in the compositor's logical coordinate space, which is the same space window moves take, so the value needs no conversion to be reused as an anchor. Publish it for the resize helper, which becomes the single place that positions the overlay. It anchors to the region when one is recorded and falls back to the monitor otherwise, so full-monitor captures, the portal backend, and manual resizes outside a recording all keep their current behaviour. A malformed or empty file falls back the same way. Presets scale from the anchor's height rather than the monitor's, so the camera keeps its proportion of the frame instead of covering a small capture outright. A tall, narrow region cannot fit a preset derived from its height, so widths are capped to the space available and heights follow at the same 8:9 aspect. Placement happens inside start_webcam_overlay rather than after it returns. Correcting the position once that function had returned left the move adjacent to gpu-screen-recorder starting, and the camera was recorded sliding the last stretch into its corner over the opening frames. The overlay is waited for explicitly instead, positioned, and only then does capture start. Waiting for the map is what the blind second was partly guessing at, so the remainder is trimmed to hold the delay before capture where it was. Starting later is not free: it eats the opening words of whatever is being narrated. * Keep the webcam size ladder usable in a narrow region Capping each preset's width to the region separately collapsed small, medium and large onto the same width, so Super + Alt + [ and ] had nothing to step between, and integer division left small taller than medium. Cap the height the presets scale from instead, which shrinks the ladder as a whole and keeps the three sizes ordered and distinct. Cover the anchoring in the test suite: a region the camera follows, the fallback for an unreadable one, and the narrow-region ladder. Point XDG_RUNTIME_DIR at the test's own directory while doing so — the resize helper now reads a region file from there, and the existing geometry assertions would pick up a real one from a live recording. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: David Heinemeier Hansson <david@hey.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Omarchy
Omarchy is a beautiful, modern & opinionated Linux distribution by DHH.
Read more at omarchy.org.
License
Omarchy is released under the MIT License.
Languages
Shell
57.3%
QML
31.2%
JavaScript
4.1%
Python
2.9%
Go Template
2.5%
Other
2%