Conversation
D-Pagey
force-pushed
the
fix/clipboard-image-deadlock
branch
from
September 13, 2026 16:55
8ac2f51 to
03a253c
Compare
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.
Problem:
The Omarchy clipboard manager ran a continuous
wl-paste --type image/png --watchprocess to capture image history. In Wayland, when an image is copied (e.g., from Chromium, Brave, or a screenshot tool), the source application often uses a single-use pipe to serve the clipboard data. Because this background watcher immediately requests the data, it consumes the single-use pipe before the user can paste it into another application. This leaves the user's paste target with nothing and results in stuckwl-copyprocesses that deadlock the clipboard entirely.Solution:
This PR completely removes the
imageWatchProcfrom the clipboard manager.While this means Omarchy no longer maintains a background history of copied images, it guarantees that image pasting works reliably 100% of the time. Text history remains perfectly intact because text payloads are tiny and aren't subject to the same single-use pipe restrictions. An explicit test has been added to ensure the image watcher is not accidentally reintroduced.
Retaining Image History
Removing the background watcher drops the image history feature. Building a background image clipboard manager on Wayland using purely bash and
wl-pasteis fundamentally flawed due to the single-use pipe issue. If the project wants to retain image history, here are the architectural alternatives:1. "Capture on Demand" (Best UX without new dependencies)
Instead of a background watcher, modify
Clipboard.qmlto read the clipboard only when the user opens the history menu (Super+Ctrl+V).2. Opt-In Toggle
Restore the watcher but put it behind a toggle (e.g.
omarchy toggle image-clipboard-history).3. Native Wayland Daemon
Integrate a native Wayland data-control daemon (like
cliphistorwl-clip-persist) that is explicitly designed to safely proxy and store clipboard file descriptors without destroying the offer for the user.