mprocs
mprocs copied to clipboard
[Feature Request] Select and copy text
Hey,
so happy to report that we've now started using mprocs, after the scroll wheel update which is great. thank you!
Links are clickable which is great, but would it be possible to be able to select and copy text from the terminal, like you can otherwise? (Also change the pointer to the text icon)
Hi. Thank you, happy to hear that mprocs is working for you.
This feature certainly should be included into mprocs. I'm thinking to implement it similar to tmux copy mode.
What do you mean by "Also change the pointer to the text icon"?
I use mprocs at work, and this is the only feature that is missing to me!
Hey @pvolok ! Thanks for the new version! I tried the copy function, but it seems that binding key 'c' doesn't copy the selected text..
I was able to select text with my mouse, pressing key 'c' and try to paste it. Is there something i'm missing?
The command i tried: mprocs 'ls -la'
@Alex141642 Which terminal are you using? And are you using tmux or screen? The first implementation is using OSC 52 terminal escape sequence, which might be disabled or not supported by terminal app or multiplexer.
For tmux it is disabled by default: https://github.com/pvolok/mprocs#copying-doesnt-work-in-tmux
I will probably have to add other ways to set clipboard content.
I'm using Terminator/Konsole with Fish !
Not being able to mark text for copy by dragging with left mouse button pressed, or to paste text marked or copied elsewhere by pressing the middle mouse button, unfortunately makes this a show stopper for Linux terminal users.
Tried in Terminator and in good old xterm.
Too bad as this is otherwise a tool that would seem to otherwise be a tool perfectly fitting my "manage vagrant VM groups" needs ... :(
It is actually very good!
It would be very good if it weren't for this show stopper. What's it good for to be able to switch between different tools output when not being able to seamlessly copy and paste?
Or are you telling me that it's good that this is not possible?
@hartmut-mariadb Selecting with mouse works. The problem is that not all terminals support copying via terminal escape codes. But I plan to add copying with other means for those terminals.
Selecting with the mouse does not work for me, I so far tried terminator, xfce4-terminal and good old xterm
Pasting a selection from another terminal with the middle mouse button works in xfce4-terminal, does not work in good old xterm, and when using terminator it turned out that a double-middle-click works.
I just released mprocs 0.6.3 with a more robust copy implementation. I hope it works for everyone. I will close this issue, please open new issues if you face any problems with the new implementation.
Hi @pvolok, this looks great! But unfortunately, both me and my colleague are unable to copy. there is nothing in the clipboard.
me: Ubuntu 21.04 colleague: Debian GNU/Linux 11 (bullseye)
@arifd On Linux we check which copy tool is available from this list:
-
wl-copy
-
xclip
-
xsel
-
termux-clipboard-set
-
tmux
If none of those tools exist in $PATH, then a terminal escape sequence OSC52 is issued (which hopefully will be picked up by your terminal app).
Can you please provide the following:
- terminal app
- x11 or wayland
- tmux?
Correct, none of the above commands are installed. In my case:
- terminal app: VS Code (1.69.0)
- x11 or wayland: x11,
- tmux?: not installedtmux
@arifd To copy text on x11 mprocs tries to use xsel
or xclip
commands. I guess that you don't have either of those available. Can you try to install either of those from your distro repos and check if mprocs can copy text?
Yup installing xsel solved it. thanks.
Perhaps this package https://crates.io/crates/clipboard/0.5.0 which also uses clipboard-win
would give you cross compatibility out of the box?
@arifd I used that crate and tried others similar. But they all segfault on linux without x11. So for now I just copied the way neovim does copying. I think it's possible to use x11-clipboard crate to copy directly through x11 api, but I'd prefer not to deal with it right now.