this post was submitted on 01 Oct 2023
132 points (96.5% liked)

Linux

48074 readers
930 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi everyone! I'm the developer of a clipboard manager that I know many of us Linux users here might know, called just The Clipboard Project.

I've spent the past couple months working on a bunch of speed optimizations, little fixes, and a really cool new feature for Linux only: asynchronous X11/Wayland clipboard synchronization. What that means is that you can copy stuff in the background and your CB clipboard will pick it all up automatically.

If that sounds awesome, then you can get the brand-spanking-new 0.8.2 version at https://github.com/Slackadays/Clipboard or this post's link (thanks, Lemmy!)

top 22 comments
sorted by: hot top controversial new old
[–] [email protected] 9 points 1 year ago* (last edited 1 year ago)

I'm an early user (I think?) And I can say that the project is very useful. Good work! I also contributed a couple issues, not much but it's honest work.

Cool to see you on Lemmy :)

[–] [email protected] 7 points 1 year ago (1 children)

Son la cinco de la mañana…

[–] [email protected] 6 points 1 year ago

y no me he dormido nada...

[–] [email protected] 6 points 1 year ago

Our FOSS terminal clipboard manager

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago) (1 children)

There’s a gif on GitHub page, but it doesn’t make it obvious (for me) if this software can help with “regular” copy/paste. What if I’m logged into two tty sessions at once, can I copy text in nano in one tty and paste it in other editor, like micro, in the other tty? With some universal hotkey?

[–] [email protected] 1 points 1 year ago (1 children)

It depends on what exactly you want to do, if you want just a hotkey that copies something in one window and pastes it in another, you'd have to set that up manually. But if you're logged into two SSH sessions at once and you want to copy something from one session and paste it in another, you could do that here. And if you want some hotkey to access something like the clipboard history in a GUI, then you'd need to set up in your window manager. Some users accomplish this through a combination of jq + dmenu (jq to process JSON output, dmenu to select an entry), so it's entirely do-able. For example, here is one such command: cb cp "$(cb hs | jq -r '.[].content | if type=="array" then .[].path else if type=="object" then .path else . end end' | dmenu)"

[–] [email protected] 2 points 1 year ago (1 children)

Yes, that’s what I wanted to know. So alas, no out-of-the-box magic for me…I find it incredibly frustrating that in 2023 one can’t simply copy-paste text from one local console to another. It seems like a basic function for a terminal-based *nix systems which doesn’t exist. I know it’s complicated even at the first glance, with huge security implications (like copying text in the root terminal and pasting it to a user one) but I believe it’s all solvable

[–] [email protected] 2 points 1 year ago (1 children)

simply copy-paste text from one local console to another

Well, if you just have two windows going to two different terminals, whatever text you select in one you can just copy to the other usually with Ctrl+SHIFT+C and Ctrl+SHIFT+V, and my clipboard manager lets you do the same even for large amounts of text you can't select. Therefore, all you'd need a specific setup for is if you want to do this action automatically with a single button press, like an Excel macro. I hope this helps! :)

[–] [email protected] 1 points 1 year ago

I think they meant TTYs

[–] [email protected] 2 points 1 year ago (1 children)

Does this work over ssh? For example, I'm in a ssh session, I can pipe something into a terminal program, and I can paste it with Ctrl + V on the host machine?

[–] [email protected] 3 points 1 year ago (2 children)

If your terminal supports something called OSC 52, then it should work great! I use Kitty which does support it and Alacrity should also too.

[–] [email protected] 3 points 1 year ago (1 children)

Do you mean it should work regardless of this tool? Or it works because of this tool?

I use foot for the most part, and alacritty when I use X. I'll check if foot has it. Thanks!!

[–] [email protected] 6 points 1 year ago

Synchronizing the clipboard over SSH uses the OSC 52 protocol, which both the terminal and the programs you run in the terminal have to support. Foot may or may not support it, and almost no regular software does, but CB got complete OSC 52 support recently.

[–] [email protected] 1 points 1 year ago

Oh I will have to look into this.

[–] [email protected] 2 points 1 year ago (2 children)

Hey, I've seen this project a while ago, and it looks really well done. However, I'm not totally sure what the usecase is for it.

Why would I use this over cp file ../file?

[–] [email protected] 3 points 1 year ago (1 children)

I'm not the author of the project but this has nothing to do with copying files around. Instead it's a clipboard manager, meaning it's to add things to your clipboard and then paste them elsewhere. So an app to manage your ctrl-C - ctrl-v

[–] [email protected] 1 points 1 year ago

I think it does actually also copy files around. That may be cool and useful, but is why I don't want to use it. I don't want to accidentally do that instead of normal clipboard stuff.

[–] [email protected] 1 points 1 year ago (1 children)

There is actually no reason to use it over cp file ../file, because that's not what it does. Instead, you can save something "for later" as if the cp command had a memory.

[–] [email protected] 1 points 1 year ago

And can it be used via ctrl+xcv commands?

[–] [email protected] 2 points 1 year ago (1 children)

Thank you, fellow 0ver.org maintainer! I am excited to see your progress

[–] [email protected] 1 points 1 year ago

Not gonna lie, I thought this was an Onion article at first.