gpakosz / .tmux

🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
MIT License
21.73k stars 3.34k forks source link

Copy Not working in gnome-terminal.. #666

Closed ronit18 closed 7 months ago

ronit18 commented 1 year ago

First of all great project. Love it and i dont know if this issue is by .tmux or gnome-terminal or because of my playing in gnome.

I have problem in gnome-terminal in which when i am in copy mode i use y to yank a line so it doesnt copy that line to my os clipboard, I have installed xclip xsel also. I have not touched the .tmux.conf file mostly, just changed one or two keybinds of url view. I have also enabled tmux_conf_copy_to_os_clipboard=true. This is output of tmux lsk | grep MouseDragEnd1Pane

bind-key    -T copy-mode    MouseDragEnd1Pane    send-keys -X copy-pipe-and-cancel wl-copy
bind-key    -T copy-mode-vi MouseDragEnd1Pane    send-keys -X copy-pipe wl-copy-no-clear

Then after trying a lot, I thought of trying other terminal emulator and tried this in alacritty, and it is working fine in that with the same config but not working in gnome-terminal.I even tried to by with clean .tmux and still didnt work. I dont know where might be problem but after trying alacritty and saw that it was working i thought of posting this issue.

gpakosz commented 8 months ago

Hello @ronit18 👋

Sorry for the delay.

This wl-copy-no-clear binding seems to be coming from a replacement of copy-selection-no-clear to wl-copy-no-clear.

gpakosz commented 8 months ago

Can you please try the gh-666 branch?

ronit18 commented 8 months ago

Hello @ronit18 👋

Sorry for the delay.

This wl-copy-no-clear binding seems to be coming from a replacement of copy-selection-no-clear to wl-copy-no-clear.

Oh No no actually the problem was that as you mentioned in readme, wl-copy or xclip or xsel should be installed on linux to make copy work, So i installed all 3 of them thats why it was not working as maybe it was getting confused of what to use. But then I just installed xclip and it worked fine. So there's really not any issue in .tmux its perfect. So maybe to not create this issue for new users you can add a little note in readme as 'install any one only, multiple may not work'.

gpakosz commented 8 months ago

Still there's a bug: wl-copy-no-clear is the result of _apply_bindings() not knowing that copy-selection-no-clear and copy-pipe-no-clear are a thing 🙂

So I'm going to use this issue to fix that bug.