Skip to content

Commit 02aaed1

Browse files
NagyViktclaude
andcommitted
v1.20: text-paste via tmux load-buffer / paste-buffer (bypass menu-modal grab)
Bug: pressing right-click → Paste from the tmux menu in a non-kitty pane (GNOME Terminal, xterm-256color) did absolutely nothing — paste appeared completely broken on this user's setup. Telemetry confirmed the bash fallback was firing and ydotool returned exit=0, but no text ever landed in the pane. Root cause: ydotool synthesizes Ctrl+Shift+V at the OS-level input device, but tmux's right-click `display-menu` is modal — it captures every keystroke until dismissed (Escape / outside click). The synthesized paste-shortcut got eaten by tmux's menu input grabber before GNOME Terminal could act on it. Same flow for kitty worked because we use `kitty @ send-text` (not a keystroke). Fix: for non-kitty terminals, skip ydotool entirely. Read the clipboard text (via helper / xclip / wl-paste in priority order), stage it into a tmux buffer, then `tmux paste-buffer -d -p -b ...` into the target pane. The pty receives the text bytes directly, no intermediary keystroke layer to be captured. Bypasses the menu's modal grab, the dock-flash on the wl-paste fork, and X-focus races all in one go. ydotool path retained as a fallback when the clipboard is empty (some text TUI apps interpret bare Ctrl+Shift+V differently). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 641a2ac commit 02aaed1

47 files changed

Lines changed: 3729 additions & 70 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 9e49bf8193ed3e9b72e2146edb87f00613d1fba0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 6e1620c314ea3786560faebc62cbe20614c72d1d
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit c190e2dd9f31f7558d91fdb94108b125ce1e9c1b
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit f7cae28170653961834e3ed7a6508aea3dc4b027

.github/FUNDING.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# FlashPaste funding channels.
2+
# Uncomment to enable the "Sponsor" button on the repo page.
3+
4+
# github: NagyVikt
5+
# ko_fi: nagyvikt
6+
# liberapay: nagyvikt
7+
# custom: ["https://paypal.me/example"]
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Bug report
2+
description: Report a defect in FlashPaste
3+
title: "[bug] "
4+
labels: ["bug", "needs-triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report a bug. Before filing, please:
10+
11+
1. Run `flashpaste-doctor` and paste the output below.
12+
2. Walk the [troubleshooting flowchart](https://github.com/NagyVikt/flashpaste/blob/main/docs/troubleshooting.md).
13+
3. Search existing issues — yours may already be tracked.
14+
15+
- type: textarea
16+
id: what-happened
17+
attributes:
18+
label: What happened?
19+
description: A clear description of the bug. What did you do, what did you expect, what actually happened?
20+
placeholder: |
21+
Pressed PrtScr → right-click → Paste in a tmux pane running Claude Code.
22+
Expected the screenshot to attach. Instead, nothing happened.
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: doctor
28+
attributes:
29+
label: flashpaste-doctor output
30+
description: Run `flashpaste-doctor` and paste the full output here.
31+
render: text
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: tmux-paste-log
37+
attributes:
38+
label: Last 50 lines of ~/.local/state/tmux-paste.log
39+
description: "`tail -n 50 ~/.local/state/tmux-paste.log`"
40+
render: text
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: pipeline-log
46+
attributes:
47+
label: Last 50 lines of ~/.local/state/clipboard-pipeline.log
48+
description: "`tail -n 50 ~/.local/state/clipboard-pipeline.log`"
49+
render: text
50+
validations:
51+
required: false
52+
53+
- type: dropdown
54+
id: distro
55+
attributes:
56+
label: Distribution
57+
options:
58+
- Ubuntu 24.04 LTS
59+
- Debian 13 (Trixie)
60+
- Fedora 40+
61+
- Pop!_OS 24.04+
62+
- Arch / Manjaro
63+
- NixOS
64+
- Other
65+
validations:
66+
required: true
67+
68+
- type: input
69+
id: kitty-version
70+
attributes:
71+
label: kitty version
72+
description: Output of `kitty --version`
73+
placeholder: "kitty 0.32.2"
74+
validations:
75+
required: true
76+
77+
- type: input
78+
id: tmux-version
79+
attributes:
80+
label: tmux version
81+
description: Output of `tmux -V`
82+
placeholder: "tmux 3.4"
83+
validations:
84+
required: true
85+
86+
- type: dropdown
87+
id: tier
88+
attributes:
89+
label: Which performance tier are you on?
90+
options:
91+
- "Tier 1 — bash hot path (default)"
92+
- "Tier 2 — flashpaste-dispatch (Rust one-shot)"
93+
- "Tier 3 — flashpasted daemon + flashpaste-trigger"
94+
- "Not sure"
95+
validations:
96+
required: true
97+
98+
- type: input
99+
id: flashpaste-version
100+
attributes:
101+
label: FlashPaste version
102+
description: Output of `flashpaste --version` or the release tag you installed
103+
placeholder: "v1.19"
104+
validations:
105+
required: true
106+
107+
- type: checkboxes
108+
id: checks
109+
attributes:
110+
label: Pre-submission checklist
111+
options:
112+
- label: I have read [docs/troubleshooting.md](https://github.com/NagyVikt/flashpaste/blob/main/docs/troubleshooting.md)
113+
required: true
114+
- label: I have searched existing issues for duplicates
115+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Troubleshooting guide
4+
url: https://github.com/NagyVikt/flashpaste/blob/main/docs/troubleshooting.md
5+
about: Walk the diagnostic flowchart and the symptom-to-fix table before opening an issue.
6+
- name: FAQ
7+
url: https://github.com/NagyVikt/flashpaste/blob/main/docs/faq.md
8+
about: 25+ Q&A entries on install, performance, integration, and alternatives.
9+
- name: Discussions
10+
url: https://github.com/NagyVikt/flashpaste/discussions
11+
about: Ask a question, share a workflow, or propose a design before filing a feature request.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Feature request
2+
description: Suggest a new capability or improvement
3+
title: "[feat] "
4+
labels: ["enhancement", "needs-triage"]
5+
body:
6+
- type: textarea
7+
id: problem
8+
attributes:
9+
label: Problem
10+
description: What user-visible problem are you trying to solve? Not the solution — the problem.
11+
placeholder: |
12+
When I paste a screenshot into Claude Code on Alacritty, nothing happens.
13+
FlashPaste only documents kitty.
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
id: proposal
19+
attributes:
20+
label: Proposed solution
21+
description: What would the ideal behaviour look like? Pseudo-config, command examples, screenshots welcome.
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
id: alternatives
27+
attributes:
28+
label: Alternatives considered
29+
description: What workarounds have you tried? Why aren't they enough?
30+
31+
- type: dropdown
32+
id: scope
33+
attributes:
34+
label: Scope
35+
options:
36+
- Bash hot path (Tier 1)
37+
- Rust one-shot dispatch (Tier 2)
38+
- Daemon + trigger (Tier 3)
39+
- flashpaste-shoot (capture)
40+
- flashpaste-mcp (agent integration)
41+
- Docs / examples
42+
- Packaging / distribution
43+
- Other
44+
validations:
45+
required: true
46+
47+
- type: checkboxes
48+
id: willingness
49+
attributes:
50+
label: Are you willing to help?
51+
options:
52+
- label: I am willing to send a PR
53+
- label: I am willing to test a PR from a maintainer

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!--
2+
Thanks for the PR. Please complete the checklist before requesting review.
3+
See AGENTS.md for the full contributor + release workflow.
4+
-->
5+
6+
## Why
7+
8+
<!-- One paragraph: what user-visible problem does this PR address? -->
9+
10+
## What changed
11+
12+
<!-- Bullet points or a paragraph. Include file paths where useful. -->
13+
14+
## How tested
15+
16+
<!-- Commands you ran, scenarios you walked through, latency numbers if relevant. -->
17+
18+
## Checklist
19+
20+
- [ ] `bash -n bin/*.sh install.sh bootstrap.sh` passes
21+
- [ ] `cargo build --release --manifest-path rs/Cargo.toml` passes (if any Rust changed)
22+
- [ ] `cargo fmt --manifest-path rs/Cargo.toml --check` passes (if any Rust changed)
23+
- [ ] `cargo clippy --release --manifest-path rs/Cargo.toml -- -D warnings` passes (if any Rust changed)
24+
- [ ] `flashpaste-doctor` runs clean against the changes
25+
- [ ] If this is a `vX.Y` bump: tag pushed in the same turn (see [AGENTS.md](../AGENTS.md))
26+
- [ ] `CHANGELOG.md` updated under `## [Unreleased]`
27+
- [ ] Relevant docs in `docs/` updated
28+
- [ ] None of the four hard-won facts (see AGENTS.md) regressed
29+
30+
## Type of change
31+
32+
<!-- Mark with [x] -->
33+
34+
- [ ] Bug fix (no API change)
35+
- [ ] Feature (additive, no breakage)
36+
- [ ] Breaking change (requires a major version bump)
37+
- [ ] Docs only
38+
- [ ] Build / packaging / CI only
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"ignorePatterns": [
3+
{ "pattern": "^http://localhost" },
4+
{ "pattern": "^https://localhost" },
5+
{ "pattern": "^http://127\\.0\\.0\\.1" },
6+
{ "pattern": "^https://127\\.0\\.0\\.1" },
7+
{ "pattern": "^http://.*\\.local(:|/|$)" },
8+
{ "pattern": "^https://.*\\.local(:|/|$)" },
9+
{ "pattern": "^file://" },
10+
{ "pattern": "^/home/" },
11+
{ "pattern": "^~/" }
12+
],
13+
"replacementPatterns": [],
14+
"httpHeaders": [
15+
{
16+
"urls": ["https://github.com/", "https://raw.githubusercontent.com/"],
17+
"headers": {
18+
"Accept": "text/html,application/xhtml+xml"
19+
}
20+
}
21+
],
22+
"timeout": "20s",
23+
"retryOn429": true,
24+
"retryCount": 3,
25+
"fallbackRetryDelay": "30s",
26+
"aliveStatusCodes": [200, 206, 403]
27+
}

0 commit comments

Comments
 (0)