Skip to content

[FEATURE] Init copy command and /copy IPC route - #27

Merged
Nadim147c merged 5 commits into
mainfrom
init-copy-command
Aug 1, 2026
Merged

Nadim147c merged 5 commits into
mainfrom
init-copy-command

Conversation

@Nadim147c

Copy link
Copy Markdown
Owner

POST /copy

Sets new clipboard content by storing a new event in the database and making it
active in the system clipboard.

  • Body: JSON object mapping MIME type strings to base64-encoded raw byte
    payloads.

Input example:

{ "text/plain": "Hello World", "text/html": "<p>Hello World</p>" }

Expected payload format:

{ "text/plain": "SGVsbG8gV29ybGQ=", "text/html": "PHA+SGVsbG8gV29ybGQ8L3A+" }
  • Response: JSON representation of the created ClipboardEvent.

Example:

Using curl and jq to encode string inputs to base64 automatically:

payload=$(jq -n \
  --arg text "Hello World" \
  --arg html "<p>Hello World</p>" \
  '{"text/plain": ($text | @base64), "text/html": ($html | @base64)}')

curl --unix-socket /run/user/1000/yankd.sock \
  -H "Content-Type: application/json" \
  -d "$payload" \
  "http://localhost/copy"

CLI Interface

image

@Nadim147c Nadim147c changed the title [FEATURE] Init copy command and /copy method [FEATURE] Init copy command and /copy IPC route Jul 31, 2026
@Nadim147c
Nadim147c force-pushed the init-copy-command branch from ef6e708 to b63135e Compare July 31, 2026 15:44
@Nadim147c
Nadim147c force-pushed the init-copy-command branch from b63135e to 0ce425f Compare July 31, 2026 15:48
@Nadim147c
Nadim147c merged commit 0537efb into main Aug 1, 2026
1 check passed
@Nadim147c
Nadim147c deleted the init-copy-command branch October 29, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant