Skip to content

Send clipboard contents to a tailnet machine with Taildrop - #9277

Open
geirolafs wants to merge 1 commit into
omacom:quattrofrom
geirolafs:tailscale-send-clipboard
Open

Send clipboard contents to a tailnet machine with Taildrop#9277
geirolafs wants to merge 1 commit into
omacom:quattrofrom
geirolafs:tailscale-send-clipboard

Conversation

@geirolafs

@geirolafs geirolafs commented Aug 31, 2026

Copy link
Copy Markdown

The Tailscale panel can send files to a machine with Taildrop (#6375); this adds the natural sibling: sending whatever is on the clipboard. It's the fastest way to get a snippet, a screenshot, or a copied batch of files onto your phone or another machine on the tailnet.

The Tailscale panel with a send-clipboard button on the machine row

Sending

Each machine row gets a clipboard button next to the file-send button, v sends to the selected machine from the keyboard, and omarchy tailscale send-clipboard <machine> does the same from the terminal. What goes over depends on what the clipboard holds:

  • An image goes over as itself (clipboard-HHMMSS.png, or its actual image type).
  • Files copied in a file manager are recognized by their text/uri-list offer and handed to the regular omarchy-tailscale-send, so the files themselves arrive rather than a text file of file:// URLs.
  • Anything else goes as a small text file the receiver can open or copy from.

Guard rails: a clipboard marked x-kde-passwordManagerHint is refused — the same marker the shell's clipboard history refuses to record. An empty clipboard is refused rather than delivering a zero-byte file. Contents are staged before the transfer starts, so a paste that dies mid-stream can't deliver an empty file and then blame Taildrop. A transfer still running after ~2 seconds announces itself in flight, so a send to a sleeping phone doesn't look like nothing happened. Notifications never echo the clipboard contents.

Receiving

On an Omarchy receiver, omarchy-tailscale-receive announces a clipboard text drop as click-to-copy: answering the notification puts the text straight on that machine's clipboard, while the file still lands in ~/Downloads as the recovery path. Oversized drops (>256KB) are announced as the plain files they have effectively become. Together the two ends give clipboard push between Omarchy machines; on phones and other platforms it arrives as a normal Taildrop file.

Why not omarchy share clipboard?

The LocalSend share is complementary: this targets a specific machine from the panel you're already in, reaches the whole tailnet across the internet (no shared LAN, no LocalSend open on the receiver), and handles image clipboards (#8340 tracks the LocalSend path sending empty files for those). Clipboard sharing across devices has also been asked for in #8451.

Testing

  • test/shell.d/tailscale-send-clipboard-test.sh (new): text/image/svg+xml naming, payload integrity, uri-list delegation with percent-decoded paths and stale-list fallback to text, password-manager refusal, both empty-clipboard shapes (no offer, empty string), paste-failure error attribution, in-flight and completion toasts, transfer-error surfacing.
  • test/shell.d/tailscale-receive-test.sh (extended): click-to-copy announcement, the file still landing in downloads, contents never echoed into the notification, a renamed name-clash keeping its click-to-copy, and the oversized fallback.
  • ./test/cli and the tailscale shell tests pass.

Verified live on my tailnet: text and image clipboards sent from the panel, the v key, and the CLI to an iPhone, including the in-flight toast on a slow transfer. The receiver's click-to-copy path is covered by the tests; it can't be exercised on a single machine since Taildrop won't send to itself.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VRQZFePBavwQkzvAzGAR1K

The Tailscale panel can already send files to a machine; add a matching
per-machine action that sends whatever is on the clipboard. An image goes
over as itself, files copied in a file manager go over as themselves
through the regular Taildrop send, and anything else goes as a small text
file the receiver can open or copy from. Password-manager copies are
refused, and a transfer that drags on announces itself in flight.
Available as a row button, the panel's `v` key, and
`omarchy tailscale send-clipboard <machine>`.

On the receiving side, a clipboard text drop is announced as
click-to-copy: answering the notification puts the text straight on that
machine's clipboard, while the file still lands in the downloads
directory as the recovery path.

Co-Authored-By: Claude (Fable 5) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VRQZFePBavwQkzvAzGAR1K
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