savedra1 / clipse

Configurable TUI clipboard manager for Unix
MIT License
272 stars 10 forks source link

Can't paste copied item. #46

Closed jeatog closed 3 months ago

jeatog commented 3 months ago

Hello! First of all this a very simple and beautiful TUI clipboard manager that seamlessly integrates with my environment. Thanks for that!

I'm having a problem right now, though. The clipse --listen command works well and it registers everything I copy. But when I want to paste it anywhere it does nothing at all. So I decided to see what happens when clipse -p and I get this exit.

Shot-2024-05-15-165850

Could anyone help me, please? Perhaps I forgot to add or config something. If you need more info I'll also share it.

Thanks!

savedra1 commented 3 months ago

hey @jeatog :wave: thank you for raising this and sorry to hear the paste function is not working. I have a few questions that may help identify the issue:

Let me know what you find!

cheers

jeatog commented 3 months ago

Hello there!

I figured out that it has to be related to the floating instance of alacritty that opens when keybinded the clipse command, and that's because if I run clipse on a normal instance it works great - lets me copy, paste and whatnot. I guess is up to me to solve this.

So, unless you have any final tip or advice, you can close this issue.

Thanks for the help!

savedra1 commented 3 months ago

Ah thanks for letting me know @jeatog

it looks like this is the same issue as #45 then so I will close this one and add any further updates in there. If you find a fix I'd love to know for my own curiosity.

EDIT: It was confirmed in the above issue that it works fine in X with xfce terminal (even after it closes) so must be some Alacritty-X issue.

The copy mechanism used by clipse for X environments is xclip -in -selection clipboard but I think the alacritty session ending also ends the connection to the X server. Was thinking you could try piping the copied input while in the session to xclip -selection clipboard to see if that helps.. Something like: alacritty -e clipse | clipboard_contents=$(xclip -selection clipboard -o) && echo '$clipboard_contents' | xclip -selection clipboard

Not sure if that will help though as I'm unable to test an X environment atm.

Apologies I can't be of more help at this time but thank you again for trying clipse! :blue_heart: