alacritty/copypasta

Copying to clipboard not working under Wayland/Hyprland

Sxmourai opened this issue · 3 comments

I'm using copypasta v0.10.1 and when I use the:

    let mut ctx = copypasta::ClipboardContext::new().unwrap();
    ctx.set_contents("test".to_owned()).unwrap();

It clears my copied buffer, but doesn't set it to "test".
I know that It should work because I have a clipboard manager and other applications are able to change my clipboard (i.e. https://gitlab.gnome.org/World/secrets)

this crate requires a running window. If you want clipboard manager you should use something like wl-clipboard-rs

I tried wl-clipboard-rs and it doesn't work... I tried cli-clipboard and other clipboard utils, none worked, I just want to make a simple app... Do you think I should create a new issue on wl-clipboard-rs repo ?
Sorry for the inconvenience

I'm not sure what application you're writing. IF you don't show any window and what clipboard mananger, use wl-clipboard-rs. If you want GUI application, you need this crate, but clipboard won't work with visible window with this crate.

So use the crate depending on your use case.