fix(herdr): seed mouse_capture=false so select-to-copy works under code-server - #39
Open
gitricko wants to merge 1 commit into
Open
fix(herdr): seed mouse_capture=false so select-to-copy works under code-server#39gitricko wants to merge 1 commit into
gitricko wants to merge 1 commit into
Conversation
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.
Root cause
Inside hermes-webtop, Hermes is served through code-server (a browser web terminal). In a herdr pane, drag-select-to-copy to the system clipboard silently fails.
mouse_capture = true, which intercepts pane mouse (SGR) events so xterm.js never gets the drag — native selection never starts.copy_on_select = true, auto-copying each selection via OSC 52. Per herdr release note #2015, the OSC 52 clipboard fix is scoped to VS Code Remote Tunnels ONLY, not code-server. So 0.7.4 (baked into the image, PR feat(docker): bake herdr + tmux into webtop image #38) is on the broken path.The fix
Set
ui.mouse_capture = falsein herdr's config. This hands the mouse back to xterm.js and restores native select/copy. Settingcopy_on_select = falsealone is insufficient (the drag is still herdr-captured, nothing copies), so the fix ismouse_capture = falseonly.Implementation
Added
docker/start-herdr.sh(auto-copied into/custom-cont-init.d/by the Dockerfile'sCOPY *.sh). It:common.sh, runs underrunuser -l abc(matching the other seed scripts)./config/.config/herdr/config.tomlonly if it does not already exist, so an existing user config is never overwritten on restart / image update.[ui]TOML block (with the explanatory comment) and runsherdr config checkto validate; skips the check gracefully if the binary is not yet on PATH at seed time.ensure_ownershipon the config dir and logs a skip on second run.Trade-off
Disabling
mouse_captureturns off herdr's right-click context menu and click-to-focus pane features. In the webtop (always browser-served) this is acceptable in exchange for working select-to-copy. Desktop/local herdr users are unaffected — this config is webtop-specific.Verification
bash -n docker/start-herdr.shpasses.herdr config checkreports asconfig: okand that containsmouse_capture = false; TOML parses cleanly.[start-herdr] config already present, skippingand does not overwrite.git diff --statshows onlydocker/start-herdr.shadded.