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 tmux to mac clipboard doesn't work #694

Open shahar-spormas opened 8 months ago

shahar-spormas commented 8 months ago

Im using this .tmux.conf for a while on my rocky machine and now i moved to mac and the copy paste wont work.

From the mac to the tmux it will print ^[[200~<pasted_test>~, But form tmux to mac it just wont work :(

I have reattach-to-user-namespace on my mac.

I tried to clone it to start fresh and now the mouse wont work.

it would be great if you will take a look at it. thanks, shahar.

gpakosz commented 8 months ago

Hello @shahar-spormas 👋

You don't need reattach-to-user-namespace on recent macOS. Maybe you could try to uninstall it first.

Then how do you paste exactly?

shahar-spormas commented 8 months ago

HEy @gpakosz 😃

Im trying command + c after highlight, shift + cmd + c, opt + cmd +c and opt + left click I uninstalled it and there is the same problem

Important note i added the mouse functionality and trying to copy from tmux out to the host (mac)

gpakosz commented 8 months ago

Hello @shahar-spormas,

Well in tmux there's no such thing as using ⌘+C for copying etc... I suggest that you get familiar with the concept of tmux bindings, and tmux copy mode.

If you enabled mouse support with <prefix>+M, the default behavior is to copy when the drag ends. If you set tmux_conf_copy_to_os_clipboard to true in your .local customization file, then it's going to use pbcopy to copy into the general pasteboard.

See the output of tmux lsk | grep MouseDrag1 and tmux | grep -E 'copy-(pipe|selection)'

shahar-spormas commented 8 months ago

yeah "getting familliar with tmux binding"... I know how to use tmux but im talking about the system. i have now problem copy pasting in tmux itself to take it out of tmux thats my problem.

tmux_conf_copy_to_os_clipboard is true

tmux lsk | grep tmux lsk | grep MouseDrag1: grep: lsk: Nosuch file or directory

tmux -L test lsk | grep -E 'copy-(pipe|selection): shows me all binds related to copy (i cant copy it from the terminal..)

gpakosz commented 8 months ago

Hmm sorry I wrote erroneous commands above (see my edited comment).

Anyways, trying to sum it up

joedulin commented 8 months ago

Alternatively, (and this may help OP as well) is there a way to flat out disable the copy mode with mouse mode on? If I turn mouse mode off, scroll wheel scrolls commands rather than the window. With it on, my OS doesn't see highlighted text. I'd personally prefer to just let my OS handle copy/paste.

Bonus points if we can unbind mouse middle click too. <-- Scratch that, I'm dense. That's an OS problem for me personally and the way I'm doing things. I'll just rebind the mouse button OS side :-)

shahar-spormas commented 8 months ago

@gpakosz

When I enter copy mode it wont highlight that i want to copy. I think thats the main problem ( I'm doing ctrl + ] and space to start coping )

gpakosz commented 8 months ago

I don't understand what's ctrl + ] is supposed to achieve.

Just to make sure things are clear:

gpakosz commented 6 months ago

Hello @shahar-spormas 👋

Any news?