Open amokfa opened 1 year ago
@imsnif @jaeheonji I can work on this issue. Here's what I have in mind:
copy_on_select
and copy_clipboard
options.copy_command
option as well and copy to the correct system clipboard based on environment. Need to test if it will work in wayland/xwayland setups.This will make zellij behave like every other linux application I'm aware of as far as clipboard is concerned. Let me know how that sounds.
Hey @amokfa, I like your proposal, and agree with most things. Also, thanks for volunteering to pick this up, I can try and help you out with this :)
Just for a bit of background, the current default behavior (copy_on_select
on) was implemented purposefully to match what tmux does by default I guess (https://github.com/zellij-org/zellij/pull/448#issuecomment-863369007).
That said here is my take on your plan:
copy_on_select
option, when it is enabled keep current behavior (maybe we could copy selection to both primary and system). when off, adopt the new more "standard" approach.copy_on_select
optionThis is where things get tricky. Unfortunately as a terminal application, there isn't a great way to interact with the system clipboard. A couple of possibilities are:
copy_command
to allow the user to configure the right thing
Let me know what you think.
cc @imsnif please feel tree to add anything/correct me if I got something wrong here :)
I have not gone into the weeds of this proposal, as I trust @tlinford 's judgement - the only thing I want to stress is that removing existing configuration parameters is a breaking change and that we should really try to avoid it. And also: I'm happy to change the bahavior of Zellij here if you think it's good, but there will always be users who will not like the new behavior and want things to be as they were before. For them we should provide an escape hatch, likely in the form of a new configuration attribute that will allow them to restore the previous behavior.
1 It is possible to use mouse copy/paste if you hold on shift . (it disable mouse mode and isn't optimal ). 2 Bindings "Alt c" should be enabled when copy_on_select=false. https://github.com/zellij-org/zellij/blob/dfae62526b7bf785feac615ec93da0857cba2dd8/example/default.kdl#L4-L5
I use this workaround to get paste working on CTRL+SHIFT+V
copy_command "wl-copy -p"
Zellij is lovely (I only just discovered it myself)! Would someone be willing to revisit this issue? It's a shame that on Linux we have inconsistent copy/paste behaviour between the primary terminal and other applications.
Hello, I also just arrived here because I noticed that double-clicking on text in the scroll buffer did not select it. I had not realized but I am quite used to it being the case that this is now bothering me.
Is there any hope this issue is re-visited? :)
1 It is possible to use mouse copy/paste if you hold on shift . (it disable mouse mode and isn't optimal ). 2 Bindings "Alt c" should be enabled when copy_on_select=false.
I'm new to Zellij
I'm using dropdown xfce-terminal
I can get copy text working by holding
But I would like a way to remove
I assume that is what this open issue is about if I'm reading it right?
Or, is there a setting / option / config I can change to remove the
Thank you!!!
Clipboard behavior in zellij is completely different from the rest of linux applications:
Selecting text using mouse This is supposed to copy text to the primary selection, which can then be pasted using middle mouse button. If I select some text in zellij using my mouse, I'm unable to paste it to either zellij, or other text fields using middle mouse. By comparison, I can select text using mouse and paste it to transfer it between chrome and any terminal emulator.
Pasting text using middle mouse I can select some text using mouse and paste it into both chrome and terminal emulators using middle mouse, but pressing the middle mouse in zellij does nothing.
I can disable copy on select, and set a copy keybinding to get half of the desired behavior. But I see no way of using both primary selection even with this setup.