Repository navigation
fix(fish): copy through OSC 52 from Herdr terminals on hosts with a desktop - #86
Merged
Merged
Conversation
…esktop Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A9D7ph123Jn8iB1eGbr8Nz
4 of 5 tasks
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
Selecting text in gentle-shell (Pi) inside a Herdr Desktop window showed "copied" but nothing reached the Mac clipboard, only for terminals on agent-gentle.
Cause: agent-gentle has its own Wayland desktop. herdr-core hands every terminal it starts this host's
DISPLAY/WAYLAND_DISPLAY, and those terminals have noSSH_CONNECTION(herdr-core starts them, not an SSH login). Pi'scopyToClipboardthen treats the session as local, copies withwl-copyinto agent-gentle's own clipboard and never emits OSC 52, which is what Herdr forwards to the viewing machine. agent-dev has no desktop, so Pi falls back to OSC 52 there and copying works.Fix:
fish/conf.d/20-herdr-clipboard.fishdropsDISPLAYandWAYLAND_DISPLAYonly for shells started by herdr-core (HC_TERMINAL_IDset) that are not real SSH sessions. Other shells on the host keep the desktop. On hosts without a desktop (this Mac, agent-dev) it changes nothing. Registered innix/home.nixnext to10-core.fish.An earlier systemd drop-in (
UnsetEnvironment=on thehc-*units) did not help: herdr-core re-adds the variables when it spawns each terminal.Verification
fish -npasses. Local cases: Herdr shell drops both variables; plain shell keepsDISPLAY; Herdr shell inside a real SSH session keeps its forwardedDISPLAY.~/.config/fish/conf.d/, 0644, same SHA-256 as the repo); the same cases pass there.🤖 Generated with Claude Code
https://claude.ai/code/session_01A9D7ph123Jn8iB1eGbr8Nz