Skip to content

copy-context writes the server's clipboard, unreachable from a remote client #40

Description

@mingrath

With herdr 0.9 multi-machine (herdr machine add), plugin actions run on the selected server. src/clipboard.ts writeClipboard() uses spawnSync("pbcopy"), so copy-context lands on the server's clipboard. A client on a different machine never receives it — herdr exposes no client-clipboard API to plugins, and there is no OSC 52 fallback.

Repro

  1. Run the herdr client on Mac A.
  2. herdr machine add <macB> --label "Mac B".
  3. Select Mac B's workspace in the sidebar.
  4. Invoke copy-context.

Text is on Mac B's clipboard; Mac A's is unchanged. Same for any action that writes the clipboard.

Suggested fix
Emit OSC 52 alongside the native writer so the client terminal picks it up when the plugin runs on a remote server.

Versions
herdr 0.9.0 (both ends), plugin 5d94eadfed96e4064b692718cef143afeb0931d3, macOS arm64, Ghostty 1.3.1.

Note: #23 is adjacent but distinct — that is about capture failing on a headless server, this is about which machine the copy lands on.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions