Nimbin[12]?Sway / SwBr / commit_message.txt

SwBr git · main

SwBr - status bar for sway

sway wayland c bar · first commit 2026-08-27 · last commit 2026-11-12 (11 days ago) · synced 1 hour ago · upstream: github.com/nimbin2/SwBr

C 95.6% Markdown 4%
git clone https://git.christianimmanuel.de/sway/SwBr.gitwget https://git.christianimmanuel.de/sway/SwBr/archive/SwBr.tar.gz
commit_message.txt 1.6 KB · 34 lines raw
swbr: talk to vcam's control API, and offer the camera's resolution

vcam has a proper control protocol now — status in one line, monitors,
capture formats, share and cam commands — so the cell stops reverse
engineering state out of an overlay list and asks for it.

What that replaces:

  - `list` parsing and guessing the webcam's corner from its pixel
    rectangle. `status` says cam_pos outright, and share_monitor names the
    monitor being shared, so the -i trick that made shares identifiable is
    gone.
  - sway's output list. vcam's own `monitors` is what `share start` takes,
    which is the list that can actually be shared.
  - vcam-ctl for most of the doing. Sharing, the webcam and the camera mode
    go down the socket, in the same round trip that reads the new state
    back, so the menu redraws from what vcam says it did rather than from
    what we hoped. Two rows still shell out: picking a region needs slurp,
    and recording is vcam-ctl's business.

New row: the camera's resolution, stepped a size at a time, built from
`capture formats` for the format in use and deduplicated by size so a
camera with thirty near-identical modes offers three or four real choices.
It changes what the camera sends, not what apps see — the output size is
fixed at vcam's startup, because the loopback's readers depend on it.

One round trip is now

    [a command from the menu] # status # monitors # capture formats # quit

with `#` marking the end of each reply, as the API describes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SuAfijAAYjLpcVwhCq3AF4