feat: enable Wayland clipboard support#79
Open
calendar0917 wants to merge 1 commit into
Open
Conversation
Enable the feature on so ekphos can interact with the system clipboard on Wayland compositors (niri, sway, Hyprland, etc.). already supports Wayland through an optional backend — this just turns it on at compile time. No Rust code changes needed. On Linux, tries Wayland first and falls back to X11 automatically.
|
This worked for me (re: this). Thanks! What I did: |
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.
Enable the
waylandfeature onclipboard-rsso ekphos can interact with the system clipboard on Wayland compositors (niri, sway, Hyprland, etc.).Problem
On Wayland-only sessions, ekphos cannot read from or write to the system clipboard. The internal vim-register clipboard still works, but
"+y/"+pare broken.Root cause
clipboard-rshas Wayland support via an optionalwl-clipboard-rsbackend, hidden behind thewaylandfeature flag. ekphos'sCargo.tomlusesclipboard-rs = "0.3"without enabling this feature, so the binary is compiled with only X11 clipboard support.Fix
Cargo.toml:clipboard-rs = "0.3"→clipboard-rs = { version = "0.3", features = ["wayland"] }Cargo.lock: auto-updated bycargo update -p clipboard-rs(bumps 0.3.1→0.3.4, pulls inwl-clipboard-rsand wayland dependency chain)No Rust source code changes required —
ClipboardContext::new()already tries Wayland first and falls back to X11 automatically.Testing
Tested on NixOS with niri (Wayland-only compositor). Copy/paste between ekphos and system clipboard works correctly.