Remote: copy from the phone to this device's clipboard
CI / test (pull_request) Successful in 1m22s

- Web UI: Ctrl+C, Ctrl+X, Ctrl+Shift+C (Cmd+C on Mac) also put what they copied, text or PNG, on this device's clipboard; Copy, Copy Selection and Copy Clipboard buttons
- chandra-remote: GET /api/clipboard/data, with the same authorization as the upload
- Compositor: clipboard-get-fd has the clipboard's owner write into a pipe, refused while locked; input-copy presses Ctrl+Shift+C in terminals, Ctrl+C elsewhere
- Pending clipboard transfers keep the main loop awake

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-30 18:26:53 -08:00
1 parent c5dbe028e6
commit 589d167f79
11 files changed
+552 -19

No files matched your search

+2
View File
@@ -24,6 +24,8 @@ out=$(curl -fsS -m 30 -H Expect: -H 'X-Chandra-Remote: 1' -H 'Content-Type: imag
--data-binary "@$R/p.png" http://127.0.0.1:6080/api/clipboard)
echo "$out"
[ "$out" = '{"ok":true,"serial":1}' ]
# The same image comes back out.
curl -fsS -m 30 -H 'X-Chandra-Remote: 1' http://127.0.0.1:6080/api/clipboard/data | cmp - "$R/p.png"
# It restarts in place, and answers again.
kill -USR2 $remote
sleep 2