zellij icon indicating copy to clipboard operation
zellij copied to clipboard

copy & paste is again not working

Open fansari opened this issue 2 years ago • 9 comments
trafficstars

I tried to copy&paste from my Linux Gnome shell but it is not working anymore.

As far as I remember it has worked with the middle button of the mouse.

I have set this:

mouse_mode = true copy_command "wl-copy -p"

When I copy a text I see the string "Text piped to external command".

When I run "wl-paste --primary" in the console I get the copied text.

So maybe this is some Gnome / Wayland issue - I am unsure.

mouse_mode = false

I can copy & paste but as far as I remember there was some reason not to use it this way (this "extra spaces at the end of the lines" issue). I have tested and this issue is still there.

https://github.com/zellij-org/zellij/issues/1330

Tested with v0.33.0 on Fedora 37 Sliverblue.

config.kdl.txt

fansari avatar Dec 07 '22 13:12 fansari

Hey, the problem here is that since mouse_mode is on, the middle click is being interpreted by zellij and doesn't cause a paste.

We need to figure out a better way to do this, but for now I think the only workaround in this scenario is to use shift+middle click.

tlinford avatar Dec 07 '22 20:12 tlinford

It is strange - today just the middle click works as before.

Next time it is not working I will try shift+middle click.

fansari avatar Dec 08 '22 17:12 fansari

Could the difference be pasting into zellij, vs pasting into another program (this should work fine)?

tlinford avatar Dec 09 '22 09:12 tlinford

In both cases I tested to paste into Visual Studio Code. I tried again now and it is still working.

fansari avatar Dec 09 '22 16:12 fansari

@tlinford i see ToggleMouseMode action in code base, but there is no bind key in config.kdl, may i ask how to enable it?

naosense avatar Dec 14 '22 02:12 naosense

Zellij 0.37.0 still not working, but yet it says it copied. If I select with shift and shift+MMB it works, but I it's not zellij doing, but terminal's, since default Gnome Terminal, Xfce Terminal and Xterm expose the same behavior.

non-descriptive avatar Jun 02 '23 14:06 non-descriptive

Zellij 0.37.0 still not working, but yet it says it copied. If I select with shift and shift+MMB it works, but I it's not zellij doing, but terminal's, since default Gnome Terminal, Xfce Terminal and Xterm expose the same behavior.

@non-descriptive Please have a look here: https://zellij.dev/documentation/faq.html#copy--paste-isnt-working-how-can-i-fix-thi

tlinford avatar Jun 03 '23 20:06 tlinford

@tlinford partially it solves the issue. Installed xclip, provided external command and provided copy_clipboard. It allows to insert via Ctrl+Shift+V, but not Shift+Insert regardless of provided clipboard buffer. copy_on_select set to true.

Also noticed that if I detach from session after changing config it will verify it on attach but will not apply changes. Is it intentional or should I make another issue?

non-descriptive avatar Jun 05 '23 15:06 non-descriptive

Yeah, at the moment, zellij either copies to clipboard or to primary buffer, not both. I'm thinking I should get back to that soon :)

I'm not sure about the second part, but it may be worth checking if there is already an issue open for that.

tlinford avatar Jun 05 '23 17:06 tlinford