Name clipboard types and sizes in the confirmation #28

Closed
opened 2026-10-16 15:11:20 -05:00 by jeff · 1 comment
Owner

Part of #23

The Confirmation for Clipboard access shows a question and, for a write, up to three rows of the text being written. It knows nothing of Clipboard types.

What done looks like

  • A write's Confirmation names each type with its size, e.g. image/png, 1.2 MiB. When text is among them, the text preview is shown as today.
  • A read's Confirmation names the types requested. Nothing is read before the user answers, so it has no sizes.
  • A read or write of text alone looks as it does today.
  • The en-US strings are added in locales/en-US.ftl.
  • Confirmation.zig unit tests cover a multi-type write and a non-text read.

Image previews are a separate issue.

Part of #23 The Confirmation for Clipboard access shows a question and, for a write, up to three rows of the text being written. It knows nothing of Clipboard types. ## What done looks like - A write's Confirmation names each type with its size, e.g. `image/png, 1.2 MiB`. When text is among them, the text preview is shown as today. - A read's Confirmation names the types requested. Nothing is read before the user answers, so it has no sizes. - A read or write of text alone looks as it does today. - The en-US strings are added in `locales/en-US.ftl`. - `Confirmation.zig` unit tests cover a multi-type write and a non-text read. Image previews are a separate issue.
jeff self-assigned this 2026-10-16 17:05:03 -05:00
Author
Owner

Done in 04ca104. A write that includes something other than text shows a dimmed row such as image/png (1.0 MiB) · text/plain (5 B) between the question and the text preview. A read shows the types it asks for. Text-only writes and reads, and OSC 52, look as before. Confirmation.namesTypes and formatSize have unit tests. The sway VM test saves the confirmation as kitty-write-asked.png before allowing the write.

Done in 04ca104. A write that includes something other than text shows a dimmed row such as `image/png (1.0 MiB) · text/plain (5 B)` between the question and the text preview. A read shows the types it asks for. Text-only writes and reads, and OSC 52, look as before. `Confirmation.namesTypes` and `formatSize` have unit tests. The sway VM test saves the confirmation as `kitty-write-asked.png` before allowing the write.
jeff closed this issue 2026-10-16 17:21:59 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
jeff/harrier#28
No description provided.