Repository navigation
Yank and put use the system clipboard - #76
Merged
Merged
Conversation
Every write to the unnamed register also goes to the system clipboard, and puts from the unnamed register, "+ and "* read it back. Text equal to the unnamed register is pholio's own, so the register keeps its shape. seam.SystemClipboard runs wl-copy/xclip/xsel/pbcopy; when writing fails the app sends the text with OSC 52 instead. Closes #75 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
When a clipboard write fails but reads work, the clipboard still holds older text; puts now use the unnamed register until a write succeeds. Also rename clipReg to isClipboardReg and reuse msgsOf in app tests. Closes #75 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A herdr or tmux server started outside the desktop gives its panes no WAYLAND_DISPLAY or DISPLAY, so no clipboard tool was picked: copies went out over OSC 52 but puts found nothing. With neither set, use the one wayland-* socket in $XDG_RUNTIME_DIR that accepts a connection. With none or several, don't guess: a copy sent to a nested compositor would be lost without an error. Closes #75 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
Added a display fallback ( |
macOS has pbcopy, so it never needs the fallback. The test's sockets now live in a short temp dir: macOS caps unix socket paths at 104 bytes and t.TempDir there exceeds it. Closes #75 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
store(register, reg) regs['"'] = r named reg → regs[reg] ("+ and "* get no slot: they are the clipboard) + Clipboard.Write(r.text) (failure → clipStale, app sends OSC 52) paste(reg) - r = regs[reg] + if reg is ", + or * + text = Clipboard.Read() + use regs['"'] if read failed, text empty, clipStale, or text == regs['"'].text + else paste text: as lines if it ends in "\n", else inlineEvidence
yyin pholio, then paste in another app → nothing.pafter copying elsewhere →E353: Nothing in register ".After: engine tests with a fake clipboard:
yy/dw/vy/blockywrite it;ppastes outside text as lines or inline; a yanked block pastes back as a block;"apignores the clipboard; read/write errors fall back to registers with no message. App test: a missing clipboard tool gives atea.SetClipboardcmd.go test ./...green, golangci-lint 0 issues.x).Merge Danger
Door: two-way
Revert the branch to restore internal-only registers. No data or config format changes.
Blast Radius: editing
Every yank, delete and
xnow runs a clipboard tool synchronously (1s timeout), and replaces the user's system clipboard contents. If that causes lag, move the writes into atea.Cmd.Closes #75
🤖 Generated with Claude Code