hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.69k stars 441 forks source link

Send clip to another CopyQ user on network #1077

Open cjohnsonuk opened 5 years ago

cjohnsonuk commented 5 years ago

Feature request I'd like to be able to select a clip I've copied and send it to another CopyQ user on my local network and it appear in their clipboard marked as from me (or from my PC). As per ditto.cp. In this software you set up a list of workstations you'd like to share with then when someone asks for information you can quickly pass it for them to work with. Great in team situations where you work as a team to find a solution then send that back to the team member who is going to use it.

Describe alternatives you've considered Could this be scripted?

Additional context There is no intermediate file store used for this as far as I can tell.

hluk commented 5 years ago

CopyQ cannot do this by itself (there is no server component) but you can create automatic command and use for example secure shell connection to synchronize clipboard (e.g. ssh 192.168.122.160 -- copyq copy -).

cjohnsonuk commented 5 years ago

Are you saying that you synchronise a tab with a folder on another computer then have that user set up their copyq to keep that tab in sync with the folder?

So I have a tab on my copyq called "send to John Doe" and John Doe has a tab on his computer called "From the boss". My tab has a command that sends any clip in that tab to a folder on John Doe's PC and his CopyQ is set to sync the contents of that folder with his "From the Boss" tab?

Could I encrypt the clip with his public key and him decrypt it with his private key?

I'm very new to this tool (<1 hour so far) but its showing so much more potential than my current tool AND CopyQ means we can use the same tool for Mac users as well. Its taken me >6 years to find a clipboard tool this good for Mac. Thank you!

hluk commented 5 years ago

Oh, I thought you needed to keep current content of system clipboard in sync.

If you need to synchronize items in tabs, have a look in the documentation - thought that requires another app like Dropbox to keep it synchronized.

Could I encrypt the clip with his public key and him decrypt it with his private key?

You can run gpg command to encrypt/decrypt the items, e.g. following commands to encrypt/decrypt from context menu or toolbar (you have to change the recipient).

[Commands]
1\Command="
    gpg2 --recipient hluk@email.cz --charset utf-8 --display-charset utf-8 --no-tty --encrypt"
1\Icon=\xf502
1\InMenu=true
1\Input=text/plain
1\Name=Encrypt
1\Output=application/x-copyq-encrypted
2\Command="
    gpg2 --recipient hluk@email.cz --charset utf-8 --display-charset utf-8 --no-tty --decrypt"
2\Icon=\xf502
2\InMenu=true
2\Input=application/x-copyq-encrypted
2\Name=Decrypt
2\Output=text/plain
size=2

(here is how to add the command to CopyQ)

cjohnsonuk commented 5 years ago

The way we use it at work is someone will ask for help writing a block of code or an sql query. Someone will pick up on this task and develop it on their own PC. Once they have something they think works they will copy the code to their clipboard and then send it to the clipboard of the user making the request (We currently use Ditto, ditto settings allow you to name the people/PCs that can send you clips or that you can send clips to ). The clip sent from one PC appears in the recipients clipboard marked with a tag "from:". Liek you've said there is no "server component to Copyq so this direct send would not work. I'm just trying to see what the closest equivalent is and how to implement it with minimum clicks from both ends once its in place.